ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   INSERT A PRINT BUTTON ON A WORKSHEET (https://www.excelbanter.com/excel-discussion-misc-queries/69774-insert-print-button-worksheet.html)

OFFICEBOY10

INSERT A PRINT BUTTON ON A WORKSHEET
 
iM TRYING TO INSERT A PRINT FUNCTION IN AN EXCEL SPREADSHEET SO THAT WHEN
CLICKING CELL IT WILL AUTOMATICALLY PRINT THE SHEET.

flummi

INSERT A PRINT BUTTON ON A WORKSHEET
 
select tools--macro--record a macro,
when asked for the macro name type: Print
under "Store in" select "This workbook"
click ok
perform the print operation,
select tools--macro--stop recording
select view--toolbars--control toolbox
click the design button (green triangle)
click the command button icon
click somewhere on your sheet, hold and drag to the right and down to
create a button
right click in the new button and from the context menu select 'view
code'
between the lines "private sub" and "end sub" type the name of your
macro which was 'Print'
close the VBA window
on your sheet click the design button
click the new button to test it.

Hans



All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com