+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] How do I put a button on an excel spreadsheet to print a report?

  1. #1
    Casper
    Guest

    [SOLVED] How do I put a button on an excel spreadsheet to print a report?

    Hi please help
    I want to put a button onto a excel spreadsheet (not the toolbar) that will
    print a report for me from another sheet, what macro do I use and what
    options do I use
    Regards
    Casper

  2. #2
    Forum Contributor keithl816's Avatar
    Join Date
    03-18-2005
    Location
    Georgia
    MS-Off Ver
    2000
    Posts
    188
    Hi Casper,

    Try going to design mode in your toolbar and clicking on the command button icon place it on the sheet desired then right click the button, click view code and try placing the code below.

    I set this up as sheet 2 being the one printed, change as needed. The same will go for the print range.

    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Dave Peterson
    Guest

    Re: How do I put a button on an excel spreadsheet to print a report?

    I would record a macro when I printed what I wanted.

    Then I'd use a button from the Forms toolbar and plop it onto that other
    sheet--and assign that recorded macro to that button.

    Your recorded macro may look something like:

    Option Explicit
    Sub Macro1()
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    End Sub

    I'd change it to be more specific (and give it a nice name):

    Option Explicit
    Sub PrintSheet1()
    worksheets("sheet1").PrintOut Copies:=1, Collate:=True
    End Sub

    Casper wrote:
    >
    > Hi please help
    > I want to put a button onto a excel spreadsheet (not the toolbar) that will
    > print a report for me from another sheet, what macro do I use and what
    > options do I use
    > Regards
    > Casper


    --

    Dave Peterson

+ 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