I need to know how to create a print button within a work sheet and also the code to make it work.
I am new to excel so need a full guide from start to finish.
Thanks in advance
![]()
I need to know how to create a print button within a work sheet and also the code to make it work.
I am new to excel so need a full guide from start to finish.
Thanks in advance
![]()
Pretty Easy. I am using Excel 2007 so if you are using a different version things may be located differently. You can do a google search for inserting a ActiveX Control button in Excel 2003.
1. Add Developer Tab. In Excel goto Top Left Button (File Button) -> Excel Options -> Popular -> Check box Show Developer Tab....
2. Go to developer tab and click intert -> Select Active X Command Button -> Click in sheet to place new button.
3. While Design Mode (in developer tab) is selected Right click on button and select View Code. Should look like this now.
4. Add the line so it looks like this.![]()
Please Login or Register to view this content.
5. You can close that window and go back to your spreadsheet. Turn off Design Mode. And click the button. Your worksheet should print out.![]()
Please Login or Register to view this content.
Note: This is a very basic printing ability but should work for your limited scope.
Thanks stnkynts
I have done as you suggeted and it works well.
I should have put in my post that I only want it to print a certain range. ie any data that is input into a table which extends daily and that I require it to bring up printer options to choose which printer it wil be printed from.
Any further help will be appreciated.
Thanks
Why not Ctrl + P?
Set the data up as a Table in Excel 2007 & it will expand as data is added. Set the Print Area to the table.
I really can't see the need for VBA
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks