On Jun 22, 11:24*am, Dave Peterson <peter...@XSPAMverizon.net> wrote:
> There is a worksheet_deactivate event you could tie into:
>
> Option Explicit
> Private Sub Worksheet_Deactivate()
> * * *Me.Range("A1").Interior.ColorIndex = xlNone
> End Sub
>
> Another option would be to use the worksheet_activate event. *That way the cell
> will have its fill color cleared when you come back to it.
>
> This kind of event code goes in the worksheet module for that sheet.
>
> On 06/22/2010 04:14, mpb wrote:
>
> > Good Morning All,
>
> > I am looking for some code to clear a cell fill when leaving the
> > worksheet.
> > ie I have a command button which goes to a specific cell on another
> > worksheet (based on the value in another worksheet)& *fills yellow.
> > Now when I leave the worksheet (and go to another), I would like the
> > fill to be removed.
>
> > Any help, as usual most appreciated.
> > Cheers
> > Mathew
>
> --
> Dave Peterson
Thank you very much Dave, always a mine of information.
Did not even realize that there was a Worksheet Activate/Deactivate
Cheers Again
Mathew
|