Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Workbooks.SaveAs - How to have it saved with .xls extension?

I have:

Set ReportBook = Workbooks.Add()

Do
fName = Application.GetSaveAsFilename
Loop Until fName < False
ReportBook.SaveAs Filename:=fName

The filename is not automatically .xls extension. How would I have it so
that when the user types Report in the FileName, the workbook gets saved as
..xls?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Workbooks.SaveAs - How to have it saved with .xls extension?

On Jul 3, 10:22 am, J@Y wrote:
I have:

Set ReportBook = Workbooks.Add()

Do
fName = Application.GetSaveAsFilename
Loop Until fName < False
ReportBook.SaveAs Filename:=fName

The filename is not automatically .xls extension. How would I have it so
that when the user types Report in the FileName, the workbook gets saved as
.xls?



If ucase(right(fname,4)) < ".XLS" then fname=fname+".xls"

Peter

  #3   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Workbooks.SaveAs - How to have it saved with .xls extension?

I guess its a manual process. Thanks!

" wrote:

On Jul 3, 10:22 am, J@Y wrote:
I have:

Set ReportBook = Workbooks.Add()

Do
fName = Application.GetSaveAsFilename
Loop Until fName < False
ReportBook.SaveAs Filename:=fName

The filename is not automatically .xls extension. How would I have it so
that when the user types Report in the FileName, the workbook gets saved as
.xls?



If ucase(right(fname,4)) < ".XLS" then fname=fname+".xls"

Peter


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
SaveAs command doesn't save extension stewart Excel Programming 4 April 9th 07 01:49 AM
Saved excel doc with extension .xsl.error harel Excel Discussion (Misc queries) 0 July 11th 06 02:24 PM
two workbooks with extension .xls1 and .xls2 Mar Excel Worksheet Functions 9 March 16th 06 10:20 PM
SaveAs and Hidden Workbooks wtpcomplab Excel Programming 1 December 11th 04 01:27 AM
Weird Problem: Excel SaveAs-- document not saved Matias[_2_] Excel Programming 1 December 6th 04 06:05 PM


All times are GMT +1. The time now is 05:35 PM.

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

About Us

"It's about Microsoft Excel"