Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Shelly9633
 
Posts: n/a
Default How do I create a macro to Save As?

How do I write a macro to SaveAs? I want it to save the file as the same
filename it already has, but to put it in a different folder. Any help?
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Record a macro while doing this under toolsmacorecord new macro

Of course that will save the file in the same folder everytime you run the
macro.

Regards,

Peo Sjoblom

"Shelly9633" wrote:

How do I write a macro to SaveAs? I want it to save the file as the same
filename it already has, but to put it in a different folder. Any help?

  #3   Report Post  
Shelly9633
 
Posts: n/a
Default

Thank you for your speedy reply, however, I already tried that method. The
problem is, it makes the filename the same everytime. I have a different
filename each time, but the same folder.

For instance, I may have a filename of Shelly.xls, to be saved into
c:\myfolder

The next time I run the macro, I may have a filename of Ron.xls to be saved
into c:\myfolder.

When I ran the macro, it changed the filename of Ron.xls to Shelly.xls (the
filename I had when I actually created the macro)

(sigh...I know this isn't making sense. What makes me think that if I can't
even ask an intelligent question, that I should be trying to create macros,
lol?)

"Peo Sjoblom" wrote:

Record a macro while doing this under toolsmacorecord new macro

Of course that will save the file in the same folder everytime you run the
macro.

Regards,

Peo Sjoblom

"Shelly9633" wrote:

How do I write a macro to SaveAs? I want it to save the file as the same
filename it already has, but to put it in a different folder. Any help?

  #4   Report Post  
Chip Pearson
 
Posts: n/a
Default

Try something like

ThisWorkbook.SaveAs filename:="H:\Temp\" & ThisWorkbook.Name

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Shelly9633" wrote in
message
...
How do I write a macro to SaveAs? I want it to save the file
as the same
filename it already has, but to put it in a different folder.
Any help?



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 and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro help Jeff Garrett Excel Discussion (Misc queries) 11 December 1st 04 08:47 PM
macro interruption: help!!! mario milani Excel Discussion (Misc queries) 1 November 30th 04 06:02 PM
How do you create a macros without overwriting the previous one y. Gibbie Excel Discussion (Misc queries) 2 November 29th 04 10:09 PM
This one is tricky....Macro to save file as cell value x in di Andy Excel Discussion (Misc queries) 4 November 26th 04 08:52 AM


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

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"