Tuesday, February 19, 2013

What if I want cell A1 to be Filename?

Today, I got asked how to do this...

After a quick search, I was able to find a macro that would do this. I will save the file in the default location for the program. You could also add this on the QAT (Quick Access Toolbar) or as a separate button.

Public Sub SaveAsA1()
    ThisFile = Range("A1").Value
    ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

No comments:

Post a Comment