Show msgbox only when....

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
 
C

Chip Pearson

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)
 
C

Cesar Zapata

Tod,



try

Private Sub Workbook_Open()



MsgBox "HI this message is open"



End Sub



cesar zapata
 

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

Top