Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto run macro at workbook open
After using TS to open a workbook in XL2002 should I use
workbook_open or auto_run to activate a macro? I have tried both with no success. Sub Workbook_Open() '(for example) Range("A1").Select Selection.Copy Range("A2").Select ActiveSheet.Paste End Sub I've tried the same code using Auto_Run. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto run macro at workbook open
http://www.cpearson.com/excel/events.htm
-- Regards, Tom Ogilvy "Juan Guemes" wrote in message ... After using TS to open a workbook in XL2002 should I use workbook_open or auto_run to activate a macro? I have tried both with no success. Sub Workbook_Open() '(for example) Range("A1").Select Selection.Copy Range("A2").Select ActiveSheet.Paste End Sub I've tried the same code using Auto_Run. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto run macro at workbook open
You need to put the Workbook_Open code in the ThisWorkbook code
module, not a regular code module. Alternately, you can use Auto_Open (not Auto_Run) in a regular code module. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Juan Guemes" wrote in message ... After using TS to open a workbook in XL2002 should I use workbook_open or auto_run to activate a macro? I have tried both with no success. Sub Workbook_Open() '(for example) Range("A1").Select Selection.Copy Range("A2").Select ActiveSheet.Paste End Sub I've tried the same code using Auto_Run. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
auto open a workbook | Excel Discussion (Misc queries) | |||
Auto open workbook(s)? | Excel Discussion (Misc queries) | |||
How to code VBA: Auto open workbook and run macro | Excel Discussion (Misc queries) | |||
Auto Open Macro | Excel Worksheet Functions | |||
auto open a workbook | Excel Programming |