ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save As Version (https://www.excelbanter.com/excel-programming/314249-save-version.html)

ianripping[_98_]

Save As Version
 

Hi.

I use a macro to create a workbook. At the end of the macro I tel
excel to bring up the save as dialog using:

myname = Application.Dialogs(xlDialogSaveAs).Show
If myname = False Then MsgBox "You cancelled the Save operation."
vbInformation, "Cancelled"

the problem that I have is that it asks what version I want to use.
need to use excel vs 97. How can I get this dialog to stop asking m
for a version so that it just knows to save it in xl97 format

--
ianrippin

-----------------------------------------------------------------------
ianripping's Profile: http://www.excelforum.com/member.php...nfo&userid=320
View this thread: http://www.excelforum.com/showthread.php?threadid=27112


Tom Ogilvy

Save As Version
 
Dim fName as String
fName = Application.GetSaveAsFileName()
if lcase(fName) < "false" then
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=fName, _
FileFormat:=xlWorkbookNormal
Application.DisplayAlerts = True
Else
MsgBox "You cancelled the Save Operation", _
vbInformation, "Cancelled"
End if

Remove Application.DisplayAlerts = False if you want notification if you
are going to overwrite an existing file.
See Help on GetSaveAsFilename for additional arguments. GetSaveAsFileName
displays the file saveas dialog, but only returns the fully qualified
path/name of the selection, so you then control saving of the file as shown
above.
--
Regards,
Tom Ogilvy

"ianripping" wrote in message
...

Hi.

I use a macro to create a workbook. At the end of the macro I tell
excel to bring up the save as dialog using:

myname = Application.Dialogs(xlDialogSaveAs).Show
If myname = False Then MsgBox "You cancelled the Save operation.",
vbInformation, "Cancelled"

the problem that I have is that it asks what version I want to use. I
need to use excel vs 97. How can I get this dialog to stop asking me
for a version so that it just knows to save it in xl97 format?


--
ianripping


------------------------------------------------------------------------
ianripping's Profile:

http://www.excelforum.com/member.php...fo&userid=3209
View this thread: http://www.excelforum.com/showthread...hreadid=271123





All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com