Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the windows scripting host object model is available on the Mac, you can
use the filesystemobject's .fileexists property to check if the filename is already taken. "Janis" wrote in message ... I recorded this macro. It works but I want the filename to be a variable not hard coded in the macro so it saves the current file name. Is there anyway to keep it from writing over the last one if the names are the same? Say it saved two of the same name in the same day. Perhaps by adding the datestamp to the variable for the name? thanks, Option Explicit Sub saveforIndesign() ' ' saveIndesign Macro ChDir "Mac OS X:Users:jrough:Documents:" ActiveWorkbook.SaveAs Filename:= _ "Mac OS X:Users:jrough:Documents:ssp_latest_082406.xls", FileFormat:=xlNormal _ , Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Macro to Open File, Delete Contents, Save New File | Excel Discussion (Misc queries) | |||
Macro to save Excel file with date and time in the file name? | Excel Programming | |||
Macro Save File (Unique file name) | Excel Worksheet Functions | |||
Macro to insert values from a file and save another sheet as a .txt file | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |