J
John Baker
Hi:
I am programmatically saving a file, and already have a file by the same name on my disc.
I wish to save WITHOUT GETTING A MESSAGE. I know there is some way I can avoid an error
message, but don't know what it is.
In addition, is there some way I can make a ChDir command stick without saving the file! I
have a situation where I switch directories (to a history file), save the spreadsheet and
then want to reset the directory to the original one. Unfortunately the following does not
work:
(wbpath is the directory for history)
ChDir wbpath
ActiveWorkbook.SaveAs Filename:="Timesheets.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ChDir "C:\ipt\timesheet"
It saves the file just fine, but when i later want to execute something which assumes I am
in the timesheet directory, i find that I am still in the history directory.
Help Please
John Baker
I am programmatically saving a file, and already have a file by the same name on my disc.
I wish to save WITHOUT GETTING A MESSAGE. I know there is some way I can avoid an error
message, but don't know what it is.
In addition, is there some way I can make a ChDir command stick without saving the file! I
have a situation where I switch directories (to a history file), save the spreadsheet and
then want to reset the directory to the original one. Unfortunately the following does not
work:
(wbpath is the directory for history)
ChDir wbpath
ActiveWorkbook.SaveAs Filename:="Timesheets.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ChDir "C:\ipt\timesheet"
It saves the file just fine, but when i later want to execute something which assumes I am
in the timesheet directory, i find that I am still in the history directory.
Help Please
John Baker