Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 15
Default Running macro upon opening workbook

This routine does not start when the workbook is opened.
Does it have to be saved somewhere other than on a VBA module of the
workbook.


Private Sub WorkbookOpen()
Call MyMacro
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default Running macro upon opening workbook

It is not workbookOpen(), but Workbook_Open()

Private Sub Workbook_Open()

Also, this code should be in the This workbook portion of your VBA - Right
click on the Excell icon in the upper left-hand corner of the screen, select
View Code and insert there.

"don" wrote:

This routine does not start when the workbook is opened.
Does it have to be saved somewhere other than on a VBA module of the
workbook.


Private Sub WorkbookOpen()
Call MyMacro
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Running macro upon opening workbook


don Wrote:
This routine does not start when the workbook is opened.
Does it have to be saved somewhere other than on a VBA module of the
workbook.


Private Sub WorkbookOpen()
Call MyMacro
End Sub


it needs to be save in the ThisWorkbook object and NOT a Std Modul

--
Ivan F Moal

-----------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195
View this thread: http://www.excelforum.com/showthread.php?threadid=54823

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Running macro upon opening workbook

"don" wrote in message
...
This routine does not start when the workbook is opened.
Does it have to be saved somewhere other than on a VBA module of the
workbook.


Private Sub WorkbookOpen()
Call MyMacro
End Sub


As well as the other two replies so far, (and this might be obvious -
apologies if I'm teaching you to suck eggs) but have you (and all your users
if you're not the only user of this wkbk) enabled macros by setting an
appropriate security level via Tools | Macro | Security ?


  #5   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 15
Default Running macro upon opening workbook

How do I save the following in Thisworkbook object.
Looking thru help I only see Thisworkbook discussed as a property.

Thanks
Don


On Sun, 4 Jun 2006 02:34:07 -0500, Ivan F Moala
wrote:


don Wrote:
This routine does not start when the workbook is opened.
Does it have to be saved somewhere other than on a VBA module of the
workbook.


Private Sub WorkbookOpen()
Call MyMacro
End Sub


it needs to be save in the ThisWorkbook object and NOT a Std Module

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
"Running Virus Scan" ....On Opening Excel Workbook Dermot Excel Discussion (Misc queries) 1 August 30th 07 09:17 PM
Running macro in another workbook Barb Reinhardt Excel Worksheet Functions 1 April 25th 07 08:30 PM
Help:Running a macro in one excel workbook from another workbook R Kapoor Setting up and Configuration of Excel 3 January 13th 06 05:11 AM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
Running a macro in another workbook Blue Excel Programming 4 July 9th 04 07:38 PM


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