Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro not finishing due to loading workbook | Excel Discussion (Misc queries) | |||
personal macro workbook just stopped loading | Excel Discussion (Misc queries) | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) | |||
Image not loading when opening Workbook | Excel Discussion (Misc queries) | |||
launching macro on workbook loading | Excel Programming |