Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Macro syntax "Save As" with filename from cell ref.

Hi, I'm looking for a macro syntax that allows me to SAVE AS with
number copied from a cell reference.
(see below "PASTE HERE FROM COPY")
Thanks in advance / Magnus
..............
Application.Goto Reference:="R1C1"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWorkbook.Close
ActiveWorkbook.SaveAs Filename:=PASTE HERE FROM COPY,
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Macro syntax "Save As" with filename from cell ref.

Is it the activecell? If so
ActiveWorkbook.SaveAs Filename:= activecell.text


--
-John
Please rate when your question is answered to help us and others know what
is helpful.


" wrote:

Hi, I'm looking for a macro syntax that allows me to SAVE AS with
number copied from a cell reference.
(see below "PASTE HERE FROM COPY")
Thanks in advance / Magnus
..............
Application.Goto Reference:="R1C1"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWorkbook.Close
ActiveWorkbook.SaveAs Filename:=PASTE HERE FROM COPY,
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub


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
a Macro to "save as" filename from a cell on the sheet and then pr gugertmk Excel Discussion (Misc queries) 0 March 31st 09 12:32 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
Save active sheet as "filename" on a remote server with username and password Teddy[_3_] Excel Programming 2 May 11th 07 04:48 PM
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
Automatically include contents of a cell in "Save As..." filename. Bryan Linton Excel Programming 1 September 1st 04 12:14 PM


All times are GMT +1. The time now is 04:41 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"