Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
strFilename = "Report Week 1"
ActiveWorkbook.SaveAs Filename:="D:\Store Returns\Reports\" & strFilename, _ FileFormat:=xlNormal, CreateBackup:=False Not tested, but better to avoid using Excel keywords as variable names! Regards, Stefi €˛leerem€¯ ezt Ć*rta: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met | Excel Discussion (Misc queries) | |||
Saving worksheet in new file with date AND cell value as file name | Excel Discussion (Misc queries) | |||
Text file saving, setting file origin | Excel Discussion (Misc queries) | |||
Excel should let me sort the file directory when saving a file | Excel Discussion (Misc queries) | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) |