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
 
Back
Top