Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I'm trying to write a macro to save (save as) the active workbook: a. in the same directory b. with a new filename (extension of the original) Lets say the name of the original file is "test.xls". I would like to Save As this file as "test_import.xls" in the same directory resulting in the original file plus a copy with the extended name. The following is a hard-coded approach which does what I need, but I need to dynamically determine the file path and edit the name. The extension to the name will always be "_import." ChDir "C:\Temp" ActiveWorkbook.SaveAs Filename:= _ "C:\Temp\test_import.xls" _ , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Any help would be appreciated. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to grab current workbook filename | Excel Worksheet Functions | |||
SaveAs uses current open workbook filename; | Excel Programming | |||
save workbook as current date using a macro | Excel Discussion (Misc queries) | |||
Save Workbook as Current Date/Time | Excel Discussion (Misc queries) | |||
unable to save current workbook within WorkbookBeforeClose | Excel Programming |