Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Forcing a FileSaveAs

Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Forcing a FileSaveAs

Hi Jonh Petty,

Why don't you save your template as Excel template, XLT file?

HTH

---
Orlando Magalhães Filho

(So that you get best and rapid solution and all may benefit from the
discussion, please reply within the newsgroup, not in email)

"John Petty" escreveu na mensagem
...
Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Forcing a FileSaveAs

As soon as it is opened using File=New, it is an xls, so you could
certainly do it in the workbook_Open event.

--
Regards,
Tom Ogilvy

John Petty wrote in message
...
Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Forcing a FileSaveAs

Thanks Tom.
-----Original Message-----
As soon as it is opened using File=New, it is an xls, so

you could
certainly do it in the workbook_Open event.

--
Regards,
Tom Ogilvy

John Petty wrote in message
...
Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Forcing a FileSaveAs

Oops. Sorry, didn't work. The file that is opened is a
template (aka XLT). But if a template is opened from
within Excel, you can overwrite it. Our users are usually
pretty good at saveas, but on occasion (when stress
overrides time), they will fill out the form and save
before sending through routing. This causes a problem for
the next user. I initially tied in some code that cleared
the contents, but that is really a bandaid and not a true
fix. What I am looking for is a way to foolproof a save
function.

-----Original Message-----
As soon as it is opened using File=New, it is an xls, so

you could
certainly do it in the workbook_Open event.

--
Regards,
Tom Ogilvy

John Petty wrote in message
...
Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Forcing a FileSaveAs

Of course if you edit it as an xla, you would need to disable events or hold
down the shift key when you open it.

--
Regards,
Tom Ogilvy

John Petty wrote in message
...
Thanks Tom.
-----Original Message-----
As soon as it is opened using File=New, it is an xls, so

you could
certainly do it in the workbook_Open event.

--
Regards,
Tom Ogilvy

John Petty wrote in message
...
Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)



.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Forcing a FileSaveAs

The proper way to use an XLT is to put it in the template directory and then
you do

file=New and select this template.

It is opened as an XLS and automatically has a new name.

If you navigate to the template and open it, then there is no advantage to
making it a template - you are just opening a workbook.

In your workbook.Open you can check to see what the situation is

Private sub Workbook_Open()
if thisworkbook.Fileformat = xlTemplate then Exit sub
if thisworkbook.FileFormat = xlWorkbookNormal then
if thisworkbook.FullName < thisworkbook.Name then
' workbook has been saved before
exit sub
else
' code to force saveas
end if
End if
End sub

--
Regards,
Tom Ogilvy




John Petty wrote in message
...
Oops. Sorry, didn't work. The file that is opened is a
template (aka XLT). But if a template is opened from
within Excel, you can overwrite it. Our users are usually
pretty good at saveas, but on occasion (when stress
overrides time), they will fill out the form and save
before sending through routing. This causes a problem for
the next user. I initially tied in some code that cleared
the contents, but that is really a bandaid and not a true
fix. What I am looking for is a way to foolproof a save
function.

-----Original Message-----
As soon as it is opened using File=New, it is an xls, so

you could
certainly do it in the workbook_Open event.

--
Regards,
Tom Ogilvy

John Petty wrote in message
...
Is there a way that I can force the user to save a
template to an XLS upon opening the template (i.e. Sub
open_Workbook)





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
Forcing to recalculate Michael.Tarnowski Excel Worksheet Functions 7 February 11th 09 02:49 PM
Forcing to Uppercase Connie Martin Excel Discussion (Misc queries) 4 February 7th 08 08:37 PM
Forcing SaveAs to new name Rob Excel Discussion (Misc queries) 2 December 3rd 06 05:14 AM
Forcing an entry [email protected] Excel Discussion (Misc queries) 3 October 19th 06 10:04 PM
forcing UDF to run Stefi Excel Worksheet Functions 4 December 29th 05 03:46 PM


All times are GMT +1. The time now is 10:44 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"