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: SaveAs Filename=ActiveCell.Text . BUT to a specified folder

Hi, I would like to "save as" with the active cell value to a
specified folder.
If use SaveAs Filename=ActiveCell.Text it save to My documents which I
don't want.
Any tips? Thanks in advance / Magnus

ActiveWorkbook.SaveAs Filename:=ActiveCell.Text, FileFormat:=xlNormal
_
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Macro syntax: SaveAs Filename=ActiveCell.Text . BUT to a specified folder

On 1 Aug, 15:12, wrote:
Hi, I would like to "save as" with the active cell value to a
specified folder.
If use SaveAs Filename=ActiveCell.Text it save to My documents which I
don't want.
Any tips? Thanks in advance / Magnus

ActiveWorkbook.SaveAs Filename:=ActiveCell.Text, FileFormat:=xlNormal
_
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False


SaveAs filename:="C:\temp\" & activecell.text

obviously replace my example c:\temp with whatever path you want!!!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Macro syntax: SaveAs Filename=ActiveCell.Text . BUT to a specified

answer taken from another thread on same subject from Bob Phillips

sFilename = Format(Worksheets("Sheet1").Range("A1").Value, "yyyy-mm-dd")
ans = MsgBox ("Save file as " & sFilename)
if ans = vbOK Then
Activeworkbook.SaveAs Filename:= sFilename
End If

Above should give you the general idea, although if memory serves this will
still save to your default "My Documents", will search for another method as
this was a question I asked on this NG a while ago

HTH

" wrote:

Hi, I would like to "save as" with the active cell value to a
specified folder.
If use SaveAs Filename=ActiveCell.Text it save to My documents which I
don't want.
Any tips? Thanks in advance / Magnus

ActiveWorkbook.SaveAs Filename:=ActiveCell.Text, FileFormat:=xlNormal
_
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Macro syntax: SaveAs Filename=ActiveCell.Text . BUT to a specified folder

If you know the path in which you want to save the file, just add the path
to the filename:
ActiveWorkbook.SaveAs Filename:="C:\Test\" & ActiveCell.Text
HTH, James
wrote in message
ups.com...
Hi, I would like to "save as" with the active cell value to a
specified folder.
If use SaveAs Filename=ActiveCell.Text it save to My documents which I
don't want.
Any tips? Thanks in advance / Magnus

ActiveWorkbook.SaveAs Filename:=ActiveCell.Text, FileFormat:=xlNormal
_
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False



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
SaveAs Filename:=filename, FileFormat:=xlCSV Teddy[_3_] Excel Programming 2 May 29th 07 02:34 PM
SaveAs Macro - Build filename from cell contents HOW? Ch33baman2 Excel Programming 4 February 22nd 07 05:03 PM
Wanted: Syntax for Filename changed without impacting Macro bluegrassstateworker Excel Programming 2 December 21st 06 07:50 PM
Macro syntax to open file in current explorer folder [email protected] Excel Discussion (Misc queries) 4 January 11th 06 12:07 PM
Macro to open SaveAs... and change filename to cell value Andy Excel Programming 5 July 19th 04 12:23 PM


All times are GMT +1. The time now is 02:41 PM.

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

About Us

"It's about Microsoft Excel"