MsgBox that will open only once.
Private Sub Workbook_Open()
Dim ReRun As Boolean
With ThisWorkbook
On Error Resume Next
ReRun = Application.Evaluate(.Names("_reRun").RefersTo)
On Error GoTo 0
If Not ReRun Then
MsgBox "Please read the instruction first", vbOKOnly +
vbInformation, "MyApp"
.Names.Add Name:="_reRun", RefersTo:="=" & True
End If
End With
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
HTH
Bob
"John" wrote in message
...
Hi Everyone
Is it possible to have a popup window ( Msgbox ) that will open only one
time.
The first time the workbook will be open, I would like to show the message
"Please read the instruction first".
I don't want the message to keep opening every time the workbook is open.
Regards
John
|