Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving file using data from worksheet
I came up with this code to save the active worksheet with a set name and
the contents of cell Y1 included in the name. But when I finish enter the code the program highlights the word Vacation and gives me the following error msg "Expected end of statement" ActiveWorkbook.SaveAs Filename:= _ "O:\PT_DRIVER_SCHED\"Vacation Mark-up (PT Drivers) & Worksheets("January").[Y1].Value", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=True |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving file using data from worksheet
Hi Patrick,
Try changing your quotes: ActiveWorkbook.SaveAs Filename:= _ "O:\PT_DRIVER_SCHED\Vacation Mark-up (PT Drivers)" _ & Worksheets("January").[Y1].Value, _ FileFormat:=xlNormal, Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=True --- Regards, Norman "Patrick Simonds" wrote in message ... I came up with this code to save the active worksheet with a set name and the contents of cell Y1 included in the name. But when I finish enter the code the program highlights the word Vacation and gives me the following error msg "Expected end of statement" ActiveWorkbook.SaveAs Filename:= _ "O:\PT_DRIVER_SCHED\"Vacation Mark-up (PT Drivers) & Worksheets("January").[Y1].Value", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=True |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving only current worksheet into new file | Excel Discussion (Misc queries) | |||
Saving Worksheet to new file by tab name | Excel Discussion (Misc queries) | |||
Saving worksheet in new file with date AND cell value as file name | Excel Discussion (Misc queries) | |||
Saving to a worksheet in another file...? | Excel Discussion (Misc queries) | |||
Saving worksheet to .doc file | Excel Programming |