Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Auto opening macro when loading a workbook

I really ought to know this but I have completely forgotten how to do it.

I'm sure it's something to do with switches or namng the macro, but none of
the methods I have tried work.

Can anyone help me out please? TIA


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto opening macro when loading a workbook

Hiya Mike,

I'm pretty new this but i know this one, go to tools then macros the
macro you will see that the box is blank now start typing in the blan
box type this :- Auto_open then click create, you must use the unde
score...there are only 2 auto macros and f course the other i
Auto_close. When you hae created your macro just paste any recorde
code that u want to run on open in here!

hope this helps.

Simo

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Auto opening macro when loading a workbook

Mike,

In the code for ThisWorkbook:

Private Sub Workbook_Open()
MsgBox "Do it"
End Sub

Excel 2002

HTH
Anders Silven

"Mike Boardman" skrev i meddelandet
...
I really ought to know this but I have completely forgotten how to do it.

I'm sure it's something to do with switches or namng the macro, but none of
the methods I have tried work.

Can anyone help me out please? TIA



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Auto opening macro when loading a workbook

Mike,

Naming the macro Auto_Open is the old (tried and trusted) way, and goes in
a standard code module, but when events made their appearance we got
Workbook_Open, which goes in the ThisWorkbook module.

A thing to note about Auto_Open is that it does not get run if a workbook is
opened from VBA, so you would need to do it explicitly with "RunAutoMacros
xlAutoOpen"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mike Boardman" wrote in message
...
I really ought to know this but I have completely forgotten how to do it.

I'm sure it's something to do with switches or namng the macro, but none

of
the methods I have tried work.

Can anyone help me out please? TIA




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Auto opening macro when loading a workbook

Thanks a lot folks - knew it was something like that!

Mike


"Bob Phillips" wrote in message
...
Mike,

Naming the macro Auto_Open is the old (tried and trusted) way, and goes

in
a standard code module, but when events made their appearance we got
Workbook_Open, which goes in the ThisWorkbook module.

A thing to note about Auto_Open is that it does not get run if a workbook

is
opened from VBA, so you would need to do it explicitly with "RunAutoMacros
xlAutoOpen"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mike Boardman" wrote in message
...
I really ought to know this but I have completely forgotten how to do

it.

I'm sure it's something to do with switches or namng the macro, but none

of
the methods I have tried work.

Can anyone help me out please? TIA






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
Macro not finishing due to loading workbook David P. Excel Discussion (Misc queries) 7 October 14th 08 07:55 PM
personal macro workbook just stopped loading GoBobbyGo Excel Discussion (Misc queries) 4 August 22nd 06 04:27 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
Image not loading when opening Workbook wadein Excel Discussion (Misc queries) 1 April 12th 06 01:53 PM
launching macro on workbook loading Ric[_2_] Excel Programming 4 October 29th 03 04:57 AM


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