Results 1 to 11 of 11

Excel macro for printing multiple sheets...

Threaded View

  1. #1
    Registered User
    Join Date
    03-13-2008
    Posts
    3

    Excel macro for printing multiple sheets...

    Hi!

    Let's say I have a workbook containing of 10 sheets. I would like to create a macro that would allow me to do the following:

    Print sheet 1, 3 and 7. Always print sheet 1, however only print sheet 3 and 7 if there in these sheets are values in the cells from row 8 and below.

    (If that is to complicated it would be ok if the condition for printing sheet 3 and 7 is that there's a value in e.g. cell A8.)

    I managed to create this script that allows me to print sheets 1, 3 and 7, however I can't seem to find out where to put the if-statement (I suppose that's how you do it?). Here's the script i created so far:

    Sub Test_skriva_ut_flera_ark_samtidigt()
    '
    ' Test_skriva_ut_flera_ark_samtidigt Macro
    ' 2008-03-13
    '
    
    '
        Sheets(Array("Sheet1", "Sheet3", "Sheet7")).Select
        Sheets("Sheet1").Activate
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
        Range("A1").Select
    End Sub
    I would really appriciate advice from you guys (and girls)

    Thank you!

    Kind regards,

    Nicklas
    Last edited by nicklas; 03-13-2008 at 07:12 AM.

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