Results 1 to 2 of 2

Selecting Worksheet then running macro based on selected worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    03-07-2011
    Location
    Old Orchard Beach, Maine
    MS-Off Ver
    Excel 2003
    Posts
    5

    Post Selecting Worksheet then running macro based on selected worksheet

    What I am trying to do is create a print routine that will know which is selected and then print according the the selected sheet. There must be a way to write a looping function to say If Quickie Board (#) is selected then print Auction Report (#) and PICKNPAY (#).

    Here is a copy of what I am trying to do...any suggestions?

    Sub QB1Print()
    '
    '
        Sheets(Array("Auction Report (1)", "PICKNPAY (1)")).Select
        Sheets("Auction Report (1)").Activate
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        Sheets("Quickie Board (1)").Select
    End Sub
    
    Sub QB2Print()
    '
    '
        Sheets(Array("Auction Report (2)", "PICKNPAY (2)")).Select
        Sheets("Auction Report (2)").Activate
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        Sheets("Quickie Board (2)").Select
    End Sub
    
    Sub QB3Print()
    '
    '
        Sheets(Array("Auction Report (3)", "PICKNPAY (3)")).Select
        Sheets("Auction Report (3)").Activate
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        Sheets("Quickie Board (3)").Select
    End Sub
    Last edited by Leith Ross; 03-17-2011 at 05:17 PM. Reason: Added Code Tags

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