+ Reply to Thread
Results 1 to 7 of 7

Hide all worksheets in a workbook which has only one row count (Header)

  1. #1
    Registered User
    Join Date
    07-23-2021
    Location
    Pakistan
    MS-Off Ver
    2019
    Posts
    10

    Question Hide all worksheets in a workbook which has only one row count (Header)

    hello i need some help.

    how can we hide worksheets which has only header row, and no data under the header row. mean if only one row present in the worksheet the sheet should be hidden.

    i tried, and need some code like that.

    Please Login or Register  to view this content.
    However, this code is not working. please help.


    Note: This VBA would be present in a xlsb file but work upon a different macro disabled output file. and the worksheets would be present on macro disabled output file so can't code on those individual worksheets.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Hide all worksheets in a workbook which has only one row count (Header)

    Try this:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Hide all worksheets in a workbook which has only one row count (Header)

    Here is another way that works as well, checking the current region rows

    Please Login or Register  to view this content.
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Hide all worksheets in a workbook which has only one row count (Header)

    @cubangt: just wondering how your solution differs from mine, other than adding a couple of steps?

  5. #5
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Hide all worksheets in a workbook which has only one row count (Header)

    Dont think it does, just didnt see your post when i posted mine as i already had a reply window open and ready.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Hide all worksheets in a workbook which has only one row count (Header)

    OK, just confused by your comment:
    Here is another way that works as well ...
    The original didn't work.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Hide all worksheets in a workbook which has only one row count (Header)

    Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Formatting Page Header on Worksheets in a Workbook
    By paulmoss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2018, 05:59 AM
  2. Hide All Worksheets But One When Closing Workbook
    By excellenthelp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2013, 11:11 AM
  3. Hide all worksheets except those specified when closing workbook
    By Cherub in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2012, 01:28 AM
  4. Create New Workbook, Copy Worksheets, But Hide One of Them - Nearly There!
    By goodwinh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2011, 01:33 PM
  5. Replies: 2
    Last Post: 04-29-2010, 10:20 AM
  6. Count worksheets in header
    By Hammer_757 in forum Excel General
    Replies: 0
    Last Post: 01-31-2006, 06:28 PM
  7. Hide range of worksheets in a workbook
    By AuthorizedUserPF in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2005, 02:06 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