+ Reply to Thread
Results 1 to 6 of 6

Help about printing

  1. #1
    Registered User
    Join Date
    02-18-2012
    Location
    Dubrovnik
    MS-Off Ver
    2010
    Posts
    20

    Help about printing

    I have mani pages on one sheet. Since i dont print them all daoily i would like to quickly select what pages will be printed.
    I would like to do that with check boxes and button for printing.
    I allready named ranges for every page separatly.
    My question. How can i make checkbox to include or exclude some page in print. and print will be done with diferent button.
    Thanks for help

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,471

    Re: Help about printing

    http://stackoverflow.com/questions/3...specific-pages

  3. #3
    Registered User
    Join Date
    02-18-2012
    Location
    Dubrovnik
    MS-Off Ver
    2010
    Posts
    20

    Re: Help about printing

    Here is what i have so far but i have error.
    I am very new with VBA so sorry and please help.

    Public Sub CheckAllCheckBoxes()
    Dim rng1 As Range
    Dim rng2 As Range
    Dim rng3 As Range
    Dim rng4 As Range
    Dim rng5 As Range
    Dim RngToPrint As Range
    Dim i As Integer

    Set rng1 = Range("a1:e47")
    Set rng2 = Range("a48:e94")
    Set rng3 = Range("a95:e139")
    Set rng4 = Range("a140:e185")
    Set rng5 = Range("a186:e232")



    i = 1
    Dim ChkBx As OLEObject
    For Each ChkBx In ActiveSheet.OLEObjects

    If TypeName(ChkBx.Object) = "CheckBox&i" Then
    ElseIf ChkBx.Object.Value = True Then
    RngToPrint = Range("rng&i")

    RngToPrint.PrintOut


    Else
    End If


    i = i + 1

    Next ChkBx


    End Sub

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,996

    Re: Help about printing

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,996

    Re: Help about printing

    Please Login or Register  to view this content.
    Last edited by protonLeah; 02-04-2017 at 04:01 PM.

  6. #6
    Registered User
    Join Date
    02-18-2012
    Location
    Dubrovnik
    MS-Off Ver
    2010
    Posts
    20

    Re: Help about printing

    Thanks man.
    I am very thankfull you helped me.
    Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. printing page number while printing entire workbook
    By shakir1401 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-23-2015, 06:06 PM
  2. Replies: 1
    Last Post: 06-11-2014, 09:23 AM
  3. Replies: 0
    Last Post: 02-27-2014, 01:31 PM
  4. Replies: 0
    Last Post: 09-18-2013, 06:34 AM
  5. Replies: 0
    Last Post: 07-18-2012, 03:57 AM
  6. Replies: 3
    Last Post: 07-16-2012, 03:24 AM
  7. Disabling Printing ability of a sheet unless printing from a macro
    By cadamhill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2012, 04:41 AM

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