+ Reply to Thread
Results 1 to 5 of 5

Macro and not print a blank page?

  1. #1
    Registered User
    Join Date
    08-13-2007
    Posts
    31

    Macro and not print a blank page?

    Hi all,
    I have the following in a workbook, Sub Printme is attached to a button on a worksheet where if check box 98 is ticked it will send ok to Sub Front35 and print worksheets back35 and front35. I have had to add another worksheet called back35A, the problem is I need to check before printing the following. If all cells G5 to G40 on back35A are empty Do Not Print back35A and just print back35 & front 35 if any cells G5 to G40 are not empty print back35, back35a and front35.

    I hope I have explained this well enough.

    If someone could help me out if this is possible and where the code goes it would be appreciated.


    Sub Printme
    If ActiveSheet.CheckBoxes("Check Box 98").Value = Checked Then
    Front35 ' sub to print first sheet
    End If
    End Sub


    Sub Front35()
    'Day 35
    Application.ScreenUpdating = False
    Sheets(Array("back35", "front35")).Select
    Sheets("front35").Activate
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Sheets("PrintMenu").Select
    Application.ScreenUpdating = True
    End Sub

    Thanks Stephen

  2. #2
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407
    Please Login or Register  to view this content.
    HTH

  3. #3
    Registered User
    Join Date
    08-13-2007
    Posts
    31
    Absolutely fantastic just got home and got your reply pasted it in and tested and works flawlessly.

    A big thanks for your help

    Is there anyway the pages could be printed back35a,back35,front35 at the moment they are coming out as back35,back35a,front35
    Last edited by stephenw; 08-14-2007 at 12:50 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407
    You can use the previous code and just move the "back35A" sheet before the "back35" sheet and it will print as you like, or you can use this code instead and it will print as you like as well.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-13-2007
    Posts
    31
    Thanks your last code did the trick.... I did try moving the 35a like you suggested in your first code, but it still printed in the wrong order.

    Thanks again

+ 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