Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Workbooks_open()

Using excel 2003 vba
When I open a workbook I want it to display a message from itself
This will be the first and only workbook user will see

Public Sub workbook_open()
MsgBox "hello"
End Sub

Is this possible?
By the way the above code does not work
If I solve this the rest of my code will be fine

Bill

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Workbooks_open()

1) Make sure your Workbook_Open code is in the ThisWorkbook module.
2) Ensure your macros are enabled when you open the workbook. If they
aren't, it won't work.
3) Ensure that the events are enabled. I ran into this problem early on.

HTH,
Barb Reinhardt

"Bill" wrote:

Using excel 2003 vba
When I open a workbook I want it to display a message from itself
This will be the first and only workbook user will see

Public Sub workbook_open()
MsgBox "hello"
End Sub

Is this possible?
By the way the above code does not work
If I solve this the rest of my code will be fine

Bill

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Workbooks_open() -solved thankyou



"Barb Reinhardt" wrote:

1) Make sure your Workbook_Open code is in the ThisWorkbook module.
2) Ensure your macros are enabled when you open the workbook. If they
aren't, it won't work.
3) Ensure that the events are enabled. I ran into this problem early on.

HTH,
Barb Reinhardt

"Bill" wrote:

Using excel 2003 vba
When I open a workbook I want it to display a message from itself
This will be the first and only workbook user will see

Public Sub workbook_open()
MsgBox "hello"
End Sub

Is this possible?
By the way the above code does not work
If I solve this the rest of my code will be fine

Bill

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Workbooks_open()

Set the Security level to low/medium in (Tools|Macro|Security). 'Launch VBE
using short-key Alt+F11. On the left treeview double click 'This Workbook '.
Drop down to get Private Sub Workbook_Open() event. Place your code-- Save
and reopen

If this post helps click Yes
---------------
Jacob Skaria


"Bill" wrote:

Using excel 2003 vba
When I open a workbook I want it to display a message from itself
This will be the first and only workbook user will see

Public Sub workbook_open()
MsgBox "hello"
End Sub

Is this possible?
By the way the above code does not work
If I solve this the rest of my code will be fine

Bill

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
Disable Workbooks_Open() Macro when opening from VBA DavidUp Excel Programming 1 January 20th 07 03:04 PM


All times are GMT +1. The time now is 09:34 AM.

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"