Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tod Tod is offline
external usenet poster
 
Posts: 13
Default Show msgbox only when....

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Show msgbox only when....

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



"Tod" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Show msgbox only when....

Tod,



try

Private Sub Workbook_Open()



MsgBox "HI this message is open"



End Sub



cesar zapata







"Tod" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 2
Default Show msgbox only when....

Hey this is great! Perfect for what I need.

thanx

"Chip Pearson" wrote in message ...
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



"Tod" wrote in message
...
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Data validation List options in a msgbox jlclyde Excel Discussion (Misc queries) 1 October 28th 09 07:26 PM
Show a message but not in MsgBox RobN[_2_] Excel Discussion (Misc queries) 2 May 30th 08 11:58 PM
msgbox peyman Excel Discussion (Misc queries) 2 September 29th 07 08:21 PM
How do I format a MSGBOX to show text and variables in a macro? Pank New Users to Excel 4 March 22nd 07 01:10 PM
MsgBox bumper338 Excel Discussion (Misc queries) 1 December 22nd 06 11:32 PM


All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"