View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jodie Jodie is offline
external usenet poster
 
Posts: 72
Default Macro to save file

Hi Mike, I am getting an "expected end of statement" error at "sheet1".
--
Thank you, Jodie


"Mike H" wrote:

Hi,

Try this

ActiveWorkbook.SaveAs Filename:=Left(Sheets("Sheet1").Range("A1"), 3) & ".xls"

Mike

"Jodie" wrote:

I would like to write a macro to save an excel file with the name being equal
to the first 3 digits of cell A1. Can this be done?
--
Thank you, Jodie