Display MsgBox when selecting a sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way that I can have a message box display whenever a particular
sheet is selected?

Thanks,
~ Horatio
 
Horatio,

Right click the sheet tab, view code and paste this in

Private Sub Worksheet_Activate()
msg = "You activated "
MsgBox msg & ActiveSheet.Name
End Sub

Mike
 
Right click on the sheet tad where you want this to happen and select
View Code. Then paste in the code below. Modify the message box as
needed.
Private Sub Worksheet_Activate()
MsgBox "your stuff here!"
End Sub
 
Thanks. It works great.
I was trying to use Workbook_SheetChange, but then I got the message for all
sheets, and I didn't know how to isolate the single sheet.

~ Horatio
 
Back
Top