i am creating a workbook and want to put a print button on the top of each
page that functions, please help
i am creating a workbook and want to put a print button on the top of each
page that functions, please help
create the button and assign a macro:
"Worksheets("sheetx").Printout copies:=1"
dlc-forbes,
Sub print_sheet()
ActiveSheet.PrintOut Copies:=1
End Sub
To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in Project Explorer click on your workbook name, if you
don't see it press CTRL + r to open the Project Explorer, then go to insert,
module, and paste the code in the window that opens on the right hand side,
press Alt and Q to close this window and go back to your workbook. To put
the button on your sheet, view, toolbars, forms, click on the button then
click on your sheet where you want the button, a box will come up to assign
a macro, pick print_sheet from the list, OK change the name on the
button if you want to, right click on it to do this. If you are using excel
2000 or newer you may have to
change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
"dlc-forbes" <[email protected]> wrote in message
news:[email protected]...
> i am creating a workbook and want to put a print button on the top of each
> page that functions, please help
hi ... im trying to make a print button but it it keeps giving me an error
ive gotten this far... well i jus copied another button that does the same thing from an older version here it is
Private Sub CommandButton1_Click()
Sheets("Sheet1").Select
'Range("a1:a9)").Select
Selection.Value = ActiveCell.Value + 1
Application.ActivePrinter = "Brother QL-550 on Ne00:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Brother QL-550 on Ne00:", Collate:=True
End Sub
it keeps saying
runtime error
"activeprinter' of object"_application' failed
ant one care to try an help??????????????
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks