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!

Saving problems in Excel

Status
Not open for further replies.

dezian

Technical User
Jul 29, 2003
21
GB
Anyone, I would like to use the value of a cell within my spread sheet as the file name for the saved version of my file, I.e Cell A2 value is 100200, I would like to use this number to save my excel file as 100200.xls. The value of the cell changes with different clients but will always be a numerical value! Any Takers.

Cheers Andy
 
Something like this would work:
Code:
  ActiveWorkbook.SaveAs Filename:=ActiveSheet.Range("A2").Value & ".xls"
Btw, you can add extra arguments to password protect etc. Check out SaveAs in the VBA help.

Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
Cheers, thanks for your time.

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top