View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
leerem leerem is offline
external usenet poster
 
Posts: 88
Default Saving as variable file name

I have the following code but it doesn't work as it should, can anyone advise
where I'm going wrong.

Dim Filename
Workbooks.Add
Filename = "Report Week 1.xls"
' Name Workbook
ActiveWorkbook.SaveAs Filename:="D:\Store Returns\Reports\Filename", _
FileFormat:=xlNormal, CreateBackup:=False

Application.DisplayAlerts = False

This will save the file with the name of "Filename" how can I change this
code to reflect the variable name - Filename

Regards

Lee