SaveCopyAs function

  • Thread starter Thread starter Dominion
  • Start date Start date
D

Dominion

I am creating a macro in Visual Basic, and I want to be
able to save a copy of the excel book named from a
refrence to a cell. If I do

ActiveWorkbook.SaveCopyAs Range("A12")

it will save a copy of the book as what ever is entered
into cell A12 into my documents folder. How can I tell
it to save it somewhere else while still being able to
select a cell refrence for a name. I also know how to
tell it to save to a spacific location as a spacific
name, but that is not what I need to do.

Thanks
 
Do you mean something like

ActiveWorkbook.SaveCopyAs "C:\Mydir\MySubDir\" & Range("A12")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
If I understand you correctly:

Const csPATH As String = "<your 'somewhere else' path>"
ActiveWorkbook.SaveCopyAs csPATH & Range("A12").Text
 
Back
Top