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 |
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 |
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 |
All times are GMT +1. The time now is 06:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com