Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Name when New workbook opened from a template SC in Texas Excel Discussion (Misc queries) 2 November 25th 09 06:24 PM
stop excel file opened as read only if already opened by another u bobm Excel Programming 3 August 5th 05 04:11 PM
Checking Before Updating Template CyndyG Excel Programming 0 April 27th 05 04:49 PM
Checking for who opened Excel junx13[_9_] Excel Programming 0 August 26th 04 09:58 AM
Template opened while being populated sanand13 Excel Programming 0 July 9th 04 03:18 AM


All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"