Event Driven Procedure
Hi,
Right click the sheet tab of the 'first sheet' view code and paste this in
and try it
Private Sub Worksheet_Activate()
For x = 1 To Worksheets.Count
If Sheets(x).Visible Then
viz = viz + 1
End If
Next
If viz < 2 Then
Worksheets(1).Cells(1, 1).Interior.ColorIndex = 3
Else
Worksheets(1).Cells(1, 1).Interior.ColorIndex = xlNone
End If
End Sub
Mike
"Varne" wrote:
Hi!
In an Excel workbook with 2 pages the 2nd is hidden. If it is unhidden the
following Macro should be triggered;
Sub Test ()
Worksheets(1).Cells(1,1).Interior.Colorindex=3
End Sub
Could someone help?
Thank You!
|