Show msgbox only when....

  • Thread starter Thread starter Tod
  • Start date Start date
T

Tod

Is there a way to show a msgbox only if the user opens the
workbook? The workbook is also opened by a script to
update some data. I don't want the msgbox code to run if
the workbook is opened from the script.

tod
 
Tod,

Look at the UserControl property. E.g.,

If Application.UserControl = True Then
MsgBox "Hello, World"
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Tod,



try

Private Sub Workbook_Open()



MsgBox "HI this message is open"



End Sub



cesar zapata
 
Back
Top