#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default macro

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

--
Gary''s Student - gsnu200750
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 638
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"