View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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.