View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jpops23@yahoo.com is offline
external usenet poster
 
Posts: 1
Default Error in grouping rows in excel using VB

Hi all-

Some code I used from a previous thread- this code allows a user to
double click a row to ungroup or group it. Works great, until you
double click a row that isn't grouped. I then get this error:

"Unable to set the Showdetail property of the Range class". Anyone know
of a way around this?

Here is the code I'm using in Excel 2002.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range,
Cancel As Boolean)
Target.EntireRow.ShowDetail = Not Target.EntireRow.ShowDetail
End Sub

Thanks in advanced!