macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

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.
 
Sub ordinate()
varFname = Application.GetSaveAsFilename(ThisWorkbook.Name, _
"Excel Files (*.xls),*.xls")
ActiveWorkbook.SaveAs Filename:=varFname
End Sub
 
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:= _
"C:\2007 Client Package\Medway 2007 Client Package.xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
 
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
 
hI jw:
I am getting an unexpected expression for the expression below it highlights
the colon and equial

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