+ Reply to Thread
Results 1 to 4 of 4

Macro to print on sheets which are not hidden

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Macro to print on sheets which are not hidden

    I have a spreadsheet which has b=multiple sheets. Some users get to see on a selected number. I can't figure how to write a macro that will only print the 'unhidden' sheets.

    I also can't figure out how to have page numbers, again, working on just the unhidden sheets i.e. if there are 20 sheets in the workbook, and only six are shown, the foot has only Page 1 - Page 6.

    Finally (!), if there are three ranges on one page which need to be printed on individual pages, how can I get the pages numbers to increment to include these these but not hidden sheets.

  2. #2
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    Macro to print on sheets which are not hidden

    Hi Bob

    Please see below code which should help you out:

    Please Login or Register  to view this content.
    Im not sure what you mean exactly by : "if there are three ranges on one page which need to be printed on individual pages", how are these defined, are they named ranges ?

    Hope this helps!

  3. #3
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Ranges

    Thanks for the code.

    Yes, the ranges are named ranges

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Thread moved to programming as per forum rules

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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