Create a message / dialog box when opening excel file

  • Thread starter Thread starter PTT
  • Start date Start date
P

PTT

Hi,

How do I create a Dialog / message box , which automatically pops up
when an excel file is opened ?

The Dialog / message box will contain some lines of text , and may
contain just a OK button or OK + CANCEL button.
The excel file should only open when the OK button is pressed.

Thank you.
 
In ThisWorkbook Module insert a workbook open code.

2 examles listed


Private Sub Workbook_Open()
MsgBox "Some Text Here", vbOKOnly
End Sub


Private Sub Workbook_Open()
Dim UserRespone
UserRespone = MsgBox("Some Text Here", vbOKCancel)
End Su
 

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