Show dialog box on worksheet open

  • Thread starter Thread starter Voodoodan
  • Start date Start date
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
 
Hi,

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

jeff
 
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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top