Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default using macros to save files in different locations

How do you get a macro to Save As a file that you have already prompted the
user for and assigned to a variable? The following code is what i have but i
can't get it to Save As the User input.


Dim vFile As String
vFile = InputBox("Please type in a date, I.E. January 2006")
ActiveWorkbook.SaveAs Filename:=vFile_
"C:\Documents and Settings\monthly\My Documents\vFile", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= False, CreateBackup:=False
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default using macros to save files in different locations

Adam,
I guess you mean:
ActiveWorkbook.SaveAs Filename:= "C:\Documents and Settings\monthly\My
Documents\" & vFile & ".xls", FileFormat:=xlNormal

NickHK

"Adam" wrote in message
...
How do you get a macro to Save As a file that you have already prompted

the
user for and assigned to a variable? The following code is what i have

but i
can't get it to Save As the User input.


Dim vFile As String
vFile = InputBox("Please type in a date, I.E. January 2006")
ActiveWorkbook.SaveAs Filename:=vFile_
"C:\Documents and Settings\monthly\My Documents\vFile", 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
How to save & send Excel files without macros. CC Excel Discussion (Misc queries) 6 October 13th 08 11:52 PM
can you automatically save files to two different locations? thrasher Excel Discussion (Misc queries) 1 June 26th 06 04:24 PM
Is it possible to save an Excel file to 2 locations? Chris_7_1 New Users to Excel 1 January 7th 05 01:03 AM
VBA Code to save to 2 locations Sinjin341[_5_] Excel Programming 0 October 13th 04 07:18 PM
VBA Code to save to 2 locations Sinjin341[_4_] Excel Programming 2 October 13th 04 01:58 PM


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