Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Hide/Unhide with cell double click

Hello,

I'm not sure if this is the correct group or not so pls forgive me if
this question is too 'beginner'.

I'm looking to hide/unhide rows 23 through 29 in a worksheet I have if/
when I dbl click on cell C22. The only example I can find that leads
me in this direction is:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Not Application.Intersect(Target, Range("s25")) Is Nothing Then
Columns(35).EntireColumn.Hidden = Not
Columns(35).EntireColumn.Hidden
End If
End Sub

But something was mentioned regarding if 'you want to simply toggle
visibility and not enter into edit mode then you'll have to Cancel =
True'. Well, I want only to toggle visibility and don't care for edit
mode. I can get the example above to work for it's intended
purpose. . . but am failing to modify if for my own purposes.

Can someone tell me how to covert the example to work on a range of
rows, and what Cancel = True means and how to implement it.

Thanks for you patients,
Bones
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,514
Default Hide/Unhide with cell double click

bones288 submitted this idea :
Hello,

I'm not sure if this is the correct group or not so pls forgive me if
this question is too 'beginner'.

I'm looking to hide/unhide rows 23 through 29 in a worksheet I have if/
when I dbl click on cell C22. The only example I can find that leads
me in this direction is:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Not Application.Intersect(Target, Range("s25")) Is Nothing Then
Columns(35).EntireColumn.Hidden = Not
Columns(35).EntireColumn.Hidden
End If
End Sub

But something was mentioned regarding if 'you want to simply toggle
visibility and not enter into edit mode then you'll have to Cancel =
True'. Well, I want only to toggle visibility and don't care for edit
mode. I can get the example above to work for it's intended
purpose. . . but am failing to modify if for my own purposes.

Can someone tell me how to covert the example to work on a range of
rows, and what Cancel = True means and how to implement it.

Thanks for you patients,
Bones


If you want to avoid using VBA macros, you can set those rows to use
'Outline' so you click a -/+ button to hide/unhide those rows. This can
be done with groups of rows AND groups of columns. Just select the rows
(or columns) you want to group and use DataGroup and Outline in
XL2003 and earlier. In XL2007 and later use Group in the Outline
section on the Data tab. If you don't want the +/- buttons AFTER the
group, you can clear the checkboxes in the Settings dialog. Once
cleared, the +/- boxes will be positioned BEFORE the group.

This will allow you to set up as many groups as you like. Groups can
also have subgroups.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Hide/Unhide with cell double click

On Jan 31, 10:34*am, GS wrote:
bones288 submitted this idea :









Hello,


I'm not sure if this is the correct group or not so pls forgive me if
this question is too 'beginner'.


I'm looking to hide/unhide rows 23 through 29 in a worksheet I have if/
when I dbl click on cell C22. *The only example I can find that leads
me in this direction is:


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
* *If Not Application.Intersect(Target, Range("s25")) Is Nothing Then
* * * Columns(35).EntireColumn.Hidden = Not
Columns(35).EntireColumn.Hidden
* *End If
End Sub


But something was mentioned regarding if 'you want to simply toggle
visibility and not enter into edit mode then you'll have to Cancel =
True'. *Well, I want only to toggle visibility and don't care for edit
mode. *I can get the example above to work for it's intended
purpose. . . but am failing to modify if for my own purposes.


Can someone tell me how to covert the example to work on a range of
rows, and what Cancel = True means and how to implement it.


Thanks for you patients,
Bones


If you want to avoid using VBA macros, you can set those rows to use
'Outline' so you click a -/+ button to hide/unhide those rows. This can
be done with groups of rows AND groups of columns. Just select the rows
(or columns) you want to group and use *DataGroup and Outline *in
XL2003 and earlier. In XL2007 and later use Group in the Outline
section on the Data tab. If you don't want the +/- buttons AFTER the
group, you can clear the checkboxes in the Settings dialog. Once
cleared, the +/- boxes will be positioned BEFORE the group.

This will allow you to set up as many groups as you like. Groups can
also have subgroups.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Incredible and exactly what I was after. Thanks so much.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,514
Default Hide/Unhide with cell double click

bones288 presented the following explanation :
On Jan 31, 10:34*am, GS wrote:
bones288 submitted this idea :









Hello,


I'm not sure if this is the correct group or not so pls forgive me if
this question is too 'beginner'.


I'm looking to hide/unhide rows 23 through 29 in a worksheet I have if/
when I dbl click on cell C22. *The only example I can find that leads
me in this direction is:


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
* *If Not Application.Intersect(Target, Range("s25")) Is Nothing Then
* * * Columns(35).EntireColumn.Hidden = Not
Columns(35).EntireColumn.Hidden
* *End If
End Sub


But something was mentioned regarding if 'you want to simply toggle
visibility and not enter into edit mode then you'll have to Cancel =
True'. *Well, I want only to toggle visibility and don't care for edit
mode. *I can get the example above to work for it's intended
purpose. . . but am failing to modify if for my own purposes.
Can someone tell me how to covert the example to work on a range of
rows, and what Cancel = True means and how to implement it.
Thanks for you patients,
Bones


If you want to avoid using VBA macros, you can set those rows to use
'Outline' so you click a -/+ button to hide/unhide those rows. This can
be done with groups of rows AND groups of columns. Just select the rows
(or columns) you want to group and use *DataGroup and Outline *in
XL2003 and earlier. In XL2007 and later use Group in the Outline
section on the Data tab. If you don't want the +/- buttons AFTER the
group, you can clear the checkboxes in the Settings dialog. Once
cleared, the +/- boxes will be positioned BEFORE the group.

This will allow you to set up as many groups as you like. Groups can
also have subgroups.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Incredible and exactly what I was after. Thanks so much.


You're welcome! Thanks for the feedback...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
One-click hide or unhide rows & columns Togowa Excel Worksheet Functions 3 August 11th 12 06:45 PM
Double Click within Cell James C. Excel Discussion (Misc queries) 0 April 23rd 09 01:17 AM
Unhide rows when you click a cell lauren_roberts08 Excel Discussion (Misc queries) 1 June 13th 06 08:27 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
Double click in a Cell Mike L Excel Discussion (Misc queries) 1 June 13th 05 03:29 PM


All times are GMT +1. The time now is 07:25 AM.

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

About Us

"It's about Microsoft Excel"