I want to issue a user warning message if they attempt to run a macro when on another tab in the workbook.
This works when a user is on the wrong tab:
However, it shows the warning message when they are also on the right tab as well.
I don't want it to show the msg when it is on the correct tab.
This works when a user is on the wrong tab:
Code:
Sub Intro()
On Error GoTo ErrMsg
If ActiveWorkbook.Worksheets("Outdoor - Baseline") Is ActiveSheet Then IntroUpdate.Show
ErrMsg:
MsgBox ("User must have Outdoor - Baseline selected."), , ".:User Error:."
End Sub
However, it shows the warning message when they are also on the right tab as well.
I don't want it to show the msg when it is on the correct tab.