How to save a vary filename by Macro in Excel?

G

Guest

I want to save a new filename every time after running the Macros
to the current path.

As the master file will transfer to different user, so the file path may
also vary.

And want to set the filename same as one of the cell content.
As the cell content will auto update for each time running the Macros.

So, could anyone give me some hints for finish this task ?

Thanks very much
 
T

Tom Ogilvy

Dim rng as Range
set rng = Worksheets("Sheet1").Range("A1")

activeworkbook.SaveAs rng.Value & "\" & activeworkbook.name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top