Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Auto Open problem
I have a template file that has a macro that runs on Private Sub
Workbook_Open() in the "ThisWorkbook". the macro triggers other routines to find a file and copy it's contents to a particualr sheet etc. This works fine on opeinng the Template file I have a button assigned to a macro that will reopen the Template file if the user wants to restart the routine. I get the usual message that reopeinng the file will cause any changes you made to be disregarded...etc. However, when the file is opened Private Sub Workbook_Open() doesn't run. Any ideas? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Auto Open problem
hi
i'm guess that the workbook open macro doesn't run becasue technically the file is already open. and the unusual message about losing data...not unsusal. standard. you are replacing the file in memory with a file from the disk. and reopening the file to restart the routine may be an inefficent way of going about it. I would do a surgical clear contents ie range("A1,B3:D3,E3:E6,H4").ClearContents to clear the template then use the call method to call other routine that need to run. I haven't seen your setup so i'm guess that this would be a better way or at least the way i would try to go about it. my thoughts Regards FSt1 "Jim" wrote: I have a template file that has a macro that runs on Private Sub Workbook_Open() in the "ThisWorkbook". the macro triggers other routines to find a file and copy it's contents to a particualr sheet etc. This works fine on opeinng the Template file I have a button assigned to a macro that will reopen the Template file if the user wants to restart the routine. I get the usual message that reopeinng the file will cause any changes you made to be disregarded...etc. However, when the file is opened Private Sub Workbook_Open() doesn't run. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
auto open message | New Users to Excel | |||
Auto-Open other file | Excel Discussion (Misc queries) | |||
Auto open a .xlt template | New Users to Excel | |||
how do you switch from auto open | Excel Discussion (Misc queries) | |||
Auto Open | Excel Discussion (Misc queries) |