Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kitepuppet
 
Posts: n/a
Default 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   Report Post  
Jason Morin
 
Posts: n/a
Default

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

kite

Make a custom view(or many) in ViewCustom 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"
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert picture in header section of excel worksheet bhavini Excel Discussion (Misc queries) 4 February 22nd 05 08:43 PM
Is there a way to HIDE a row based on a value of a cell ? Reddiance Excel Discussion (Misc queries) 4 January 26th 05 02:57 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
Autocomplete based on a different worksheet. rv Excel Discussion (Misc queries) 3 December 8th 04 04:39 AM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"