ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   macro (https://www.excelbanter.com/excel-worksheet-functions/163048-macro.html)

Mac

macro
 
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.
--
thank you mac

Gary''s Student

macro
 
Sub ordinate()
varFname = Application.GetSaveAsFilename(ThisWorkbook.Name, _
"Excel Files (*.xls),*.xls")
ActiveWorkbook.SaveAs Filename:=varFname
End Sub

--
Gary''s Student - gsnu200750

Mac

macro
 
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
--
thank you mac


"mac" wrote:

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.
--
thank you mac


JW[_2_]

macro
 
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

mac wrote:
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.
--
thank you mac



Mac

macro
 
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


"JW" wrote:

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

mac wrote:
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.
--
thank you mac





All times are GMT +1. The time now is 03:18 PM.

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