I need a simple Save-As macro but I need to save to the current name and
path (overwrite)
It's easy to record a macro to do the Save-As command, but it uses the
specific file name and path in the script. Is there a string that will just
reference the current file name in the current directory, so the macro will
work in any file without having to modify it. Don't ask me why, but I need
to do a Save-As as opposed to a Save to make a different macro work.
Save -As must do something slightly different.
Below is what I have now
************
ActiveWorkbook.SaveAs Filename:= _
"Q:\COP\06-243 FCC Energy Recovery Detailed\ENGINEER\Lists\PN
2005044 Piping Line List Rev 0.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
************

Signature
Posted via a free Usenet account from http://www.teranews.com
Dave Peterson - 09 Mar 2007 23:14 GMT
with activeworkbook
.saveas filename:=.fullname, .....
Maybe you're removing passwords????
with activeworkbook
.Password = ""
.save
end with
????
> I need a simple Save-As macro but I need to save to the current name and
> path (overwrite)
[quoted text clipped - 18 lines]
> --
> Posted via a free Usenet account from http://www.teranews.com

Signature
Dave Peterson
Gord Dibben - 09 Mar 2007 23:19 GMT
Mike
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & _
ThisWorkbook.Name
Application.DisplayAlerts = True
Gord Dibben MS Excel MVP
>I need a simple Save-As macro but I need to save to the current name and
>path (overwrite)
[quoted text clipped - 15 lines]
> ReadOnlyRecommended:=False, CreateBackup:=False
>************