+ Reply to Thread
Results 1 to 3 of 3

Visual basic print code for excel 2007

  1. #1
    Registered User
    Join Date
    07-29-2009
    Location
    Ireland
    MS-Off Ver
    Excel 365
    Posts
    54

    Visual basic print code for excel 2007

    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
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Visual basic print code for excel 2007

    Right-click the button, choose Assign Macro, New, and you'll see
    Please Login or Register  to view this content.
    Then add this line:
    Please Login or Register  to view this content.
    Then you will need to save as a macro-enabled (.xlsm) workbook, close, and reopen.

    In the alternative, you could just add a print button to the quick-launch toolber.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Visual basic print code for excel 2007

    Hello mattless1.

    You can use
    Please Login or Register  to view this content.
    And that should sent the print to the defult printer.

    Or you can chose the defult printer from a dialog box before the print.

    Please Login or Register  to view this content.
    I have noticed that when your worksheet is printed it is printed over two pages.
    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.

+ 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