+ Reply to Thread
Results 1 to 4 of 4

Print button setup and code

  1. #1
    Registered User
    Join Date
    04-14-2011
    Location
    liverpool, england
    MS-Off Ver
    Excel 2003
    Posts
    16

    Red face Print button setup and code

    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


  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Print button setup and code

    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.
    Please Login or Register  to view this content.
    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.

    Note: This is a very basic printing ability but should work for your limited scope.

  3. #3
    Registered User
    Join Date
    04-14-2011
    Location
    liverpool, england
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Print button setup and code

    Quote Originally Posted by stnkynts View Post
    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.
    Please Login or Register  to view this content.
    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.

    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

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Print button setup and code

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1