View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
MartinShort
 
Posts: n/a
Default filename in macro


Try this:


Code:
--------------------
Sub saveFile()
Dim myPath As String
Dim myfileName As String
myPath = "C:\"
myfileName = myPath & Range("A1")
ActiveWorkbook.SaveAs Filename:=myfileName
End Sub
--------------------


Change the variable pathName to suit your needs.

HTH

Martin


--
MartinShort

Software Tester
------------------------------------------------------------------------
MartinShort's Profile: http://www.excelforum.com/member.php...o&userid=22034
View this thread: http://www.excelforum.com/showthread...hreadid=551117