View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Worksheet Navigation Help

Something like this perhaps:
Sub NavigateSheet()
If Sheets("OtherSht").Range("F2")<"" Then 'not blank
MsgBox "Your message"
Exit Sub
End If
Sheets("Sheet2").Select
End Sub
"michael" wrote in message
ups.com...
I am using the code below in a module to allow users to easily navigate
between sheets...

Sub NavigateSheet()
Sheets("Sheet2").Select
End Sub

However, I'd like to block the navigation and show a message box if a
cell on another sheet is populated.

Any ideas?

Thank you in advance.

-M