Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking whether .xls file was just opened from a template
I would like to use in my Workbook_Open event handler the GetSaveAsFileName
method to have the user name the workbook. I want to "suggest" the file name for the user (which would include the current date). But I only want to do this when the file is created from my template. I don't want to do this every time the workbook is opened. I could do some kind of check on the current file name (to see if it's in the "template1.xls" form), but that means changing code if we change the template name. That's likely to happen since we may make 50 different version for different customers. I'm hoping there's another way to check this. Hope this makes sense! Any ideas? Thanks! Beth A. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking whether .xls file was just opened from a template
If thisworkbook.path = "" then
fName = Application.GetSaveAsFilename . . . -- Regards, Tom Ogilvy "BethA" wrote in message ... I would like to use in my Workbook_Open event handler the GetSaveAsFileName method to have the user name the workbook. I want to "suggest" the file name for the user (which would include the current date). But I only want to do this when the file is created from my template. I don't want to do this every time the workbook is opened. I could do some kind of check on the current file name (to see if it's in the "template1.xls" form), but that means changing code if we change the template name. That's likely to happen since we may make 50 different version for different customers. I'm hoping there's another way to check this. Hope this makes sense! Any ideas? Thanks! Beth A. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking whether .xls file was just opened from a template
Thanks Tom - that's perfect! And I should have known that...
Beth A. "Tom Ogilvy" wrote: If thisworkbook.path = "" then fName = Application.GetSaveAsFilename . . . -- Regards, Tom Ogilvy "BethA" wrote in message ... I would like to use in my Workbook_Open event handler the GetSaveAsFileName method to have the user name the workbook. I want to "suggest" the file name for the user (which would include the current date). But I only want to do this when the file is created from my template. I don't want to do this every time the workbook is opened. I could do some kind of check on the current file name (to see if it's in the "template1.xls" form), but that means changing code if we change the template name. That's likely to happen since we may make 50 different version for different customers. I'm hoping there's another way to check this. Hope this makes sense! Any ideas? Thanks! Beth A. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Control Name when New workbook opened from a template | Excel Discussion (Misc queries) | |||
stop excel file opened as read only if already opened by another u | Excel Programming | |||
Checking Before Updating Template | Excel Programming | |||
Checking for who opened Excel | Excel Programming | |||
Template opened while being populated | Excel Programming |