+ Reply to Thread
Results 1 to 3 of 3

how to hide section of worksheet based on a condition (e.g. tick .

  1. #1
    kitepuppet
    Guest

    how to hide section of worksheet based on a condition (e.g. tick .

    I need to hide a section of a worksheet to make it more simple to understand.
    But I also want to display the hidden sections if needed , preferably by
    ticking a box?
    Any ideas? Thanks in advance.

  2. #2
    Jason Morin
    Guest

    Re: how to hide section of worksheet based on a condition (e.g. tick .

    Here's a simple example. If the user double-clicks A1,
    then the column G thru J will hide/unhide.

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
    As Range, Cancel As Boolean)
    If Not Intersect(Me.[A1], Target) Is Nothing Then
    If Me.[G:J].EntireColumn.Hidden = True Then
    Me.[G:J].EntireColumn.Hidden = False
    Else
    Me.[G:J].EntireColumn.Hidden = True
    End If
    End If
    End Sub

    ---
    To use, right-click on the worksheet tab, go to View
    Code, and paste in the code above. Press ALT+Q to return
    to Excel.

    HTH
    Jason
    Atlanta, GA

    >-----Original Message-----
    >I need to hide a section of a worksheet to make it more

    simple to understand.
    >But I also want to display the hidden sections if

    needed , preferably by
    >ticking a box?
    >Any ideas? Thanks in advance.
    >.
    >


  3. #3
    Gord Dibben
    Guest

    Re: how to hide section of worksheet based on a condition (e.g. tick .

    kite

    Make a custom view(or many) in View>Custom Views.

    Add a macro to your workbook...

    Sub Show_Hidden()
    ActiveWorkbook.CustomViews("hidden").Show
    End Sub

    Assign to a button.


    Gord Dibben Excel MVP


    On Fri, 4 Mar 2005 07:53:09 -0800, "kitepuppet"
    <[email protected]> wrote:

    >I need to hide a section of a worksheet to make it more simple to understand.
    >But I also want to display the hidden sections if needed , preferably by
    >ticking a box?
    >Any ideas? Thanks in advance.



+ 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