• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SaveAs Macro Help

bradpallister

New Member
Hi

I have a worksheet template (a type of form to be filled out).


I would like to SaveAs a worksheet named after one particular cell (this cell is different with every form that is filled out), perhaps with a macro or similar.


Anyone have any ideas how to do this?


Many thanks
 
Code:
Sub SaveAsName()

Dim MyDir As String

Dim MyName As String


'Change these as desired/needed

MyDir = "C:My Documents"

MyName = Range("A1").Value


    ActiveWorkbook.SaveAs Filename:=MyDir & MyName & ".xls"

End Sub
 
Back
Top