Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following and would like the sheet to be saved by combining two
cell values in the active sheet. Can anyone Help? Many thanks Dunc Sub PrintandSave() ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True MsgBox "Your document has been printed. Click OK To Copy Memo to A New Sheet, You can then save the Memo From Here", vbInformation, "HEAD OFFICE - Payroll Documents" Range("B2:M34").Select Selection.Copy Workbooks.Add ActiveSheet.Paste Range("A1").Select ActiveSheet.SaveAs Filename:="U:\"cell e10" & "cell e12".xls |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi Duncan, In the last line, your quotes are a bit mixed up... I would also name the two elements before using them... it should read something like... first = Range("E10") second = Range("E12") ActiveSheet.SaveAs Filename:="U:\" & first & second & ".xls" Try that... Regards, Gareth, Duncan Wrote: I have the following and would like the sheet to be saved by combining two cell values in the active sheet. Can anyone Help? Many thanks Dunc Sub PrintandSave() ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True MsgBox "Your document has been printed. Click OK To Copy Memo to A New Sheet, You can then save the Memo From Here", vbInformation, "HEAD OFFICE - Payroll Documents" Range("B2:M34").Select Selection.Copy Workbooks.Add ActiveSheet.Paste Range("A1").Select ActiveSheet.SaveAs Filename:="U:\"cell e10" & "cell e12".xls -- pianoman ------------------------------------------------------------------------ pianoman's Profile: http://www.excelforum.com/member.php...o&userid=33712 View this thread: http://www.excelforum.com/showthread...hreadid=552163 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA SaveAs Value | Excel Discussion (Misc queries) | |||
More help with SaveAs | Excel Programming | |||
Help with SaveAs | Excel Programming | |||
SaveAs... | Excel Programming | |||
SaveAs | Excel Programming |