Saving in a different version.....

Jorn

Board Regular
Joined
Jul 10, 2003
Messages
92
Good Afternoon,

I have the following code that initiates a save dialogue box and saves the file that is currently open on the screen.

Private Sub SaveasButton_Click()
Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False
ActiveWorkbook.SaveAs FileName:=fName
End Sub

The problem i have is that it will only save as the current file type of the open excel document (which in this case is excel 1). I need this to save as excel5.

Does anyone have any ideas?

John.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

SIXTH SENSE

Well-known Member
Joined
Oct 29, 2003
Messages
1,883
hi!

try this!


<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> Macro1()
fname = "C:\test\IMexcel5.xls"
    ActiveWorkbook.SaveAs Filename:= _
        fname, FileFormat:= _
        xlExcel5, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
        , CreateBackup:=False
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
 

Jorn

Board Regular
Joined
Jul 10, 2003
Messages
92
Howdy,

I need the save dialog box to open like any other windows program with the ability to switch the current directory at whim to wherever.

John.
 

SIXTH SENSE

Well-known Member
Joined
Oct 29, 2003
Messages
1,883
hi!
Private Sub SaveasButton_Click()
Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False
ActiveWorkbook.SaveAs Filename:= _
fname, FileFormat:= _
xlExcel5, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub
 

Jorn

Board Regular
Joined
Jul 10, 2003
Messages
92
Cheers matey!

This works a treat and I thank you for all your help. Hopefully telling them to save "just as in Excel" wont confuse the poor dears as much as explaining file versions!

Take Care and thanks again!!

John.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,683
Messages
5,637,779
Members
416,982
Latest member
lisam77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top