Show dialog box on worksheet open

V

Voodoodan

Hi,

I am trying to get my custom dialog box to appear whenever a use
clicks on one of my worksheets, named "Sickness". The dialog box is o
a sheet called "Confirmation" (nothing to do with priesthood!).

I thought it would be as simple as viewing the code on the "Sickness
sheet and entering:

Sub dialog()
DialogSheets("Confirmation").Show
End Sub

Bit basic?!?

Does anyone know how this can be done, please?

And I'm possibly shooting for the moon here but if you know how i
could only appear once per document viewing, that would be nice, bu
not crucial. It's just the first bit that really matters.

Thanks for any help,
Dan
 
J

jeff

Hi,

right click on your "Sickness" tab, select view code.
paste this:
Private Sub Worksheet_Activate()
MsgBox "hi"
End Sub

jeff
 
D

Dave Peterson

If you're using xl95, there's:

application.onsheetactivate

that you can find in help.

(I thought that since you're showing a dialogsheet (not a userform), that this
might be germane. Jawohl!)
 
Top