automatic file naming


Posted by Brian M. on January 18, 2002 12:28 AM

Is there any way I can run a macro that will use a name from a given cell as the file name?

Posted by Lewis (1) on January 18, 2002 3:35 AM

Try

myFile = "Problem_Report_" & Range("B5").Value
ActiveWorkbook.SaveAs "C:\Windows\temp\" & myFile

Changing names cells and directory as required



Posted by Brian M. on January 18, 2002 4:27 AM

Thanks, it worked easily.