Hi can someone help i have a workbook, which i use as an order form. i would like to have a print button on the workbook. is there a code i can enter to make this print to the default printer?
Thanks
Mattless1
Hi can someone help i have a workbook, which i use as an order form. i would like to have a print button on the workbook. is there a code i can enter to make this print to the default printer?
Thanks
Mattless1
Right-click the button, choose Assign Macro, New, and you'll see
Then add this line:![]()
Sub Button1_Click() End Sub
Then you will need to save as a macro-enabled (.xlsm) workbook, close, and reopen.![]()
Sub Button1_Click() ActiveSheet.PrintOut End Sub
In the alternative, you could just add a print button to the quick-launch toolber.
Entia non sunt multiplicanda sine necessitate
Hello mattless1.
You can useAnd that should sent the print to the defult printer.![]()
sub mattless () ActiveWindow.SelectedSheets.PrintOut Copies:=1 end sub
Or you can chose the defult printer from a dialog box before the print.
I have noticed that when your worksheet is printed it is printed over two pages.![]()
Sub mattless() Application.Dialogs(xlDialogPrinterSetup).Show ActiveWindow.SelectedSheets.PrintOut Copies:=1 End Sub
you can specify a print range "edit the red for your range"
Range("A12", Range("A65536").End(xlUp).Offset(0, 9)).PrintOut Copies:=1, Collate:=True
you may also be able to fit it on one page with changing the cell length.
Good luck, and hope this helps.
Last edited by D_Rennie; 08-09-2009 at 07:16 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks