Excel - macro

Asked By ma on 22-Oct-07 08:50 AM

I am new to macros.  I have created a macro that I want to use on a template
and once it is run, I want it to ask me what file name to save as.  Could
someone help me with this.  Any help will be greatly appreciated.
thank you mac

GarysStuden replied on 22-Oct-07 09:17 AM
Sub ordinate()
varFname = Application.GetSaveAsFilename(ThisWorkbook.Name, _
ActiveWorkbook.SaveAs Filename:=varFname
End Sub

Gary''s Student - gsnu200750
ma replied on 22-Oct-07 09:30 AM
Hi Gary's student,

Thank you for your reply.  I am attaching part of the macro.  Could you
please tell me how to use it in this format.?   I want to replace the word
Medway. Again thank you for your help.

ChDir "C:\2007 Client Package"
ActiveWorkbook.SaveAs Filename:= _
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
thank you mac
JW replied on 22-Oct-07 09:34 AM
Sub likeThis()
Dim fName As Variant
fName = Application.GetSaveAsFilename _
(FileFilter:="Excel Files (*.xls),*.xls)")
If fName = False Then Exit Sub
On Error Resume Next
ActiveWorkbook.SaveAs fName
End Sub
ma replied on 22-Oct-07 10:07 AM
hI jw:
I am getting an unexpected expression for the expression below it highlights
the colon and equial

(FileFilter:="Excel Files (*.xls),*.xls)")

thank you mac