Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save to specific dir using a macro

Status
Not open for further replies.

dezian

Technical User
Jul 29, 2003
21
GB
I am trying to save an excel file to a specific directory using the value of a cell as a file name, the using of the cell value works in the code below, but I cant for the life of me get the file to save anywhere but where the original file is saved?

ActiveWorkbook.SaveAs Dir = "S:\WGSpecChemOps\QC Analytical\Facility 2\CERTS\2003", FileName:=ActiveSheet.Range("I7").Value & ".xls"

This is the bit that I can't get to work,

"S:\WGSpecChemOps\QC Analytical\Facility 2\CERTS\2003",

Anyone Help

Cheers Andy
 
Hi dezian,

You're making it more complicated that you need. Just include the path in the filename (there is no Dir parameter) ..

Code:
ActiveWorkbook.SaveAs FileName:="S:\WGSpecChemOps\QC Analytical\Facility 2\CERTS\2003\" &  ActiveSheet.Range("I7").Value & ".xls"

Enjoy,
Tony
 
Cheers mate, thanks for your time.

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top