VB in Excel. - TechRepublic
General discussion
July 21, 2005 at 02:51 AM
frenchwood

VB in Excel.

by frenchwood . Updated 20 years, 10 months ago

Hope someone can help me on this.

I have written a VB macro in Excel that does a variety of things, and the final one being to save the file.

What i am trying to do is set the fileformat, however; regardless of the coding i always end up with Save as type “All Types(*.*)”.

My VB is as follows:

Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False
ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=”Microsoft Excel Workbook(*.xls), *.xls”, Password:=””, WriteResPassword:=””, ReadOnlyRecommended:= _
False, CreateBackup:=False

Any clues?

This discussion is locked

All Comments