#1   Report Post  
Posted to microsoft.public.excel.misc
James Coughlan
 
Posts: n/a
Default msgbox

Hi,
I am trying to set up a msgbox when opening a file. I am using the following
code:

Private Sub Workbook_Open()
MsgBox "Don't forget to Update!"
End Sub

However it's not showing a msgbox even though it is telling me that macro's
have been installed.
Please help. Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Paul B
 
Posts: n/a
Default msgbox

James, do you have it in the thisworkbook module?

To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in Project Explorer double click on thisworkbook, under your
workbook name, if you don't see it press CTRL + r to open the Project
Explorer, then paste the code in the window that opens on the right hand
side, press Alt and Q to close this window and go back to your workbook, now
this will run every time you open the workbook. If you are using excel 2000
or newer you may have to change the macro security settings to get the macro
to run. To change the security settings go to tools, macro, security,
security level and set it to medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"James Coughlan" <James wrote in message
...
Hi,
I am trying to set up a msgbox when opening a file. I am using the
following
code:

Private Sub Workbook_Open()
MsgBox "Don't forget to Update!"
End Sub

However it's not showing a msgbox even though it is telling me that
macro's
have been installed.
Please help. Many thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
James Coughlan
 
Posts: n/a
Default msgbox

Gentlemen, Thanks to you both for your quick replies. Yes, the location was
the problem!
Thanks again,
James

"Paul B" wrote:

James, do you have it in the thisworkbook module?

To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in Project Explorer double click on thisworkbook, under your
workbook name, if you don't see it press CTRL + r to open the Project
Explorer, then paste the code in the window that opens on the right hand
side, press Alt and Q to close this window and go back to your workbook, now
this will run every time you open the workbook. If you are using excel 2000
or newer you may have to change the macro security settings to get the macro
to run. To change the security settings go to tools, macro, security,
security level and set it to medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"James Coughlan" <James wrote in message
...
Hi,
I am trying to set up a msgbox when opening a file. I am using the
following
code:

Private Sub Workbook_Open()
MsgBox "Don't forget to Update!"
End Sub

However it's not showing a msgbox even though it is telling me that
macro's
have been installed.
Please help. Many thanks




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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
If a worksheet name is = to test then a msgbox appears Vick Excel Discussion (Misc queries) 1 December 21st 05 11:17 PM
MsgBox compile error in Excell Jerry Dyben Excel Discussion (Misc queries) 1 October 11th 05 07:04 PM
Compile error for MsgBox copied from Microsoft training example? Jerry Dyben Excel Discussion (Misc queries) 2 October 11th 05 05:48 AM
Msgbox Wildman Excel Worksheet Functions 1 April 26th 05 04:57 AM


All times are GMT +1. The time now is 11:02 AM.

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

About Us

"It's about Microsoft Excel"