Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File opens another file runs macro and closes
I want to have a sub in a file like:
File named: FileStarter.xls Sub OpenFile1() Workbooks.Open Filename:= _ "C:\File001.xls", Password:="aaaaa" End Sub Then in File001.xls I want to run an Auto_Open macro which will start run on the opening of File001.xls and the first thing I want to do is close FileStarter.xls and continue running more code in File001.xls Auto_Open. I am trying but cannot make this work. Thank you for your help, Steven |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File opens another file runs macro and closes
hi
see your other post. Regards FSt1 "Steven" wrote: I want to have a sub in a file like: File named: FileStarter.xls Sub OpenFile1() Workbooks.Open Filename:= _ "C:\File001.xls", Password:="aaaaa" End Sub Then in File001.xls I want to run an Auto_Open macro which will start run on the opening of File001.xls and the first thing I want to do is close FileStarter.xls and continue running more code in File001.xls Auto_Open. I am trying but cannot make this work. Thank you for your help, Steven |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
File opens another file runs macro and closes
Sub OpenFile1()
Workbooks.Open Filename:= _ "C:\File001.xls", Password:="aaaaa" ThisWorkbook.Close False End Sub ? Tim "Steven" wrote in message ... I want to have a sub in a file like: File named: FileStarter.xls Sub OpenFile1() Workbooks.Open Filename:= _ "C:\File001.xls", Password:="aaaaa" End Sub Then in File001.xls I want to run an Auto_Open macro which will start run on the opening of File001.xls and the first thing I want to do is close FileStarter.xls and continue running more code in File001.xls Auto_Open. I am trying but cannot make this work. Thank you for your help, Steven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook1 opens Workbook2 and runs Workbook2's macro | Excel Programming | |||
Run macro when file closes | Excel Programming | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
Creating a .bat file that opens, pauses & closes MS Excel | Excel Programming | |||
in a excel file, how to make a menu item for the .xls file that when clicked on it runs myform.show? example plz | Excel Worksheet Functions |