Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expanding rows by double clicking certain cells

Status
Not open for further replies.

tankthefrank

Technical User
Jun 19, 2009
9
0
0
AU
Hi,

I have attached a test s/s to demo what i'm trying to do. I want to be able to double click a cell (underlined cell in col D) to expand out grouped rows. So basically i can have a finer list of rows which can be expanded out individually by double clicking any of these underlined cell values.
Someone suggested using the following code but i don't know how this picks up a grouping or that it is a certain cell i want to select and not just the entire worksheet. Any help would be much appreciated.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
ActiveSheet.Rows(Target.Row).ShowDetail = Not ActiveSheet.Rows(Target.Row).ShowDetail
End Sub
 
Why not simply use the collapse/expand buttons from groupings ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I want almost the same effect as colllapse/expand but off a single cell on double click. I could drop an object onto the cell which i want the collapse to be triggered but i thought double clicking an underlined cell would be alot better for the user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top