Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2007

Tip: Looking for answers? Try searching our database.

Save-As Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Kiekover - 09 Mar 2007 23:02 GMT
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
>************
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.