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

Hi I want this Macro to run when the Workbook is opened:

Private Sub Workbook_Open()
MsgBox "Hi I am here"
End Sub

The workbook opens asks me if I want to run macros - I enable
but nothing else happens.
what must I do to make the macro run?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Private Sub Workbook_Open()

You should paste the code to the Workbook module..In Visual Basic Editor from
the left treeview search for the workbook name and click on + to expand it.
Within that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the same code to the right code pane.

--
Jacob


"Helmut" wrote:

Hi I want this Macro to run when the Workbook is opened:

Private Sub Workbook_Open()
MsgBox "Hi I am here"
End Sub

The workbook opens asks me if I want to run macros - I enable
but nothing else happens.
what must I do to make the macro run?

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
Private Sub Workbook_Open() doesn't run Steve Starr Excel Discussion (Misc queries) 4 April 3rd 11 05:05 AM
Using - Private Sub Workbook_Open()" SANDIND Excel Programming 2 July 31st 08 03:11 PM
Failure to execute Private Workbook_Open Rick Excel Programming 0 June 5th 07 05:10 PM
XL97 Private Sub Workbook_Open() Not Working Pete Excel Programming 6 April 19th 05 08:47 PM
Cannot get Auto_Open or Private Sub Workbook_Open() to run at star Paul Moles Excel Programming 0 October 28th 04 03:53 PM


All times are GMT +1. The time now is 04:14 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"