Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save in different folder
I want to save a workbook in a different folder. The folder already exists,
and I want to use the same file name. What is correct code to do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save in different folder
Try code like the following:
Sub AAA() Dim NewPath As String NewPath = "D:\Temp\" & ThisWorkbook.Name ThisWorkbook.SaveAs Filename:=NewPath End Sub Change the "D:\Temp\" to the full folder path to which you want to save the file. Cordially, Chip Pearson Microsoft Most Valuable Professional, Excel, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com On Sat, 22 May 2010 13:22:01 -0700, S.S. wrote: I want to save a workbook in a different folder. The folder already exists, and I want to use the same file name. What is correct code to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update workbooks in folder, new name and save in new folder | Excel Programming | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
open file from folder save in new folder | Excel Programming | |||
"Save As" folder -- can I default this to the same folder as origi | Excel Discussion (Misc queries) |