+ Reply to Thread
Results 1 to 3 of 3

VBA to print user selectable worksheets

  1. #1
    Registered User
    Join Date
    09-24-2015
    Location
    London, England
    MS-Off Ver
    Office 2013
    Posts
    31

    VBA to print user selectable worksheets

    Good Morning, Excel Forum

    I would like to add a button to a workbook which gives users to options of which sheets to print.
    I feel that I'm halfway there but my basic (self taught) understanding of VBA is hindering me from moving forwards and understanding exactly how I can correct my errors!

    Rather than giving the user the option of printing all sheets containing data I would only like to give them the option of printing visible sheets.
    Is this possible?
    I've attached a sample.

    Thank you for reading & I appreciate your help
    Laura
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: VBA to print user selectable worksheets

    Do a simple check in the userform Initialize event that the sheet is visible...

    Please Login or Register  to view this content.
    (Don't forget the corresponding 'End If')

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: VBA to print user selectable worksheets

    Let's start with this.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. User selectable data from Scroll Bar Form Control
    By mcarrigg1 in forum Excel General
    Replies: 1
    Last Post: 01-05-2017, 10:28 AM
  2. Use Excel Print Button to print all worksheets in workbook and then ungroup
    By Smudge72 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2016, 06:08 PM
  3. Use Worksheets Specified by User Input (Like Print Dialogue)
    By k64 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2014, 11:19 AM
  4. [SOLVED] User's choice to several checkbox options will place user name on selected worksheets
    By SLJones in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2013, 12:03 PM
  5. [SOLVED] Macro To Make The Number Of Pages To Print Selectable
    By LoneWolf3574 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2012, 02:50 AM
  6. User Selectable Range
    By bignowa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2011, 10:25 AM
  7. WorksheetFunction.Round using user-selectable rounding value?
    By Punsterr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2006, 03:30 PM

Tags for this Thread

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