Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Any way to set the Default Filename for a new document?

I have an Excel Template (XLT) I've created. When the user creates a new file
from the template, it asks for certain information and fills those in on the
form automatically.

When the user goes to save, I'd like to have the default filename given in the
Save As dialog box be something like "Price Quotation - [Company Name
Here].xls". Right now, when you go to save, it is the same name as the XLT plus
a "1" at the end....

Anyway to set this in VBA?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Any way to set the Default Filename for a new document?

Hello Tim

Public Function mySaveAs()
Dim varName
Dim strDefault
strDefault = "Price Quotation - [Company Name Here]"
With ActiveWorkbook
If Not .Saved Then
varName = .Application.GetSaveAsFilename(strDefault,
"Microsoft Excel (*.xls),*.xls", , "Overwrite only Company")
If varName = False Then
Exit Function
End If
End If
End With
mySaveAs = varName
MsgBox varName
End Function

Heiko
:-)

"Tim" wrote:

I have an Excel Template (XLT) I've created. When the user creates a new file
from the template, it asks for certain information and fills those in on the
form automatically.

When the user goes to save, I'd like to have the default filename given in the
Save As dialog box be something like "Price Quotation - [Company Name
Here].xls". Right now, when you go to save, it is the same name as the XLT plus
a "1" at the end....

Anyway to set this in VBA?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Any way to set the Default Filename for a new document?

Add a reference to the Common Controls library and use the
Save As function. You can set everything about the dialog
box, including the default file name, file name filters,
and default target directory.

David Gray
P6 Consulting
http://www.p6c.com/

You are more important than any technology we may employ.


-----Original Message-----


When the user goes to save, I'd like to have the default

filename given in the
Save As dialog box be something like "Price Quotation -

[Company Name
Here].xls". Right now, when you go to save, it is the

same name as the XLT plus
a "1" at the end....

Anyway to set this in VBA?


.

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
How do I Hyperlink to document using filename in cell? Matt Bennette Excel Worksheet Functions 3 December 10th 08 10:24 AM
Is there a way to default the number times a document prints? Bat Excel Discussion (Misc queries) 1 August 24th 08 07:57 AM
How do I revise default document properties information? Bill sailing Setting up and Configuration of Excel 2 April 13th 07 11:46 AM
Turn off default filename "Copy Of" when resaving a file Office2003 Setting up and Configuration of Excel 1 July 30th 05 01:39 AM
default blank excel document?? Scott Setting up and Configuration of Excel 4 July 15th 05 11:53 PM


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