jim may
Well-known Member
- Joined
- Jul 4, 2004
- Messages
- 7,486
This code works fine when I double click on Cat1 through Cat8; But I get R/T 91 - ERROR ONLY
when I double-click on Cat9 (Only). What could be my problem?
TIA, Jim
when I double-click on Cat9 (Only). What could be my problem?
TIA, Jim
Rich (BB code):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim MyMacro
Cancel = True
MyMacro = Target.Value
Select Case MyMacro
Case "Cat1"
ActiveSheet.ListObjects("Table1").Range.Select
Case "Cat2"
ActiveSheet.ListObjects("Table1").HeaderRowRange.Select
Case "Cat3"
ActiveSheet.ListObjects("Table1").DataBodyRange.Select
Case "Cat4"
ActiveSheet.ListObjects("Table1").ListColumns(3).Range.Select
Case "Cat5"
ActiveSheet.ListObjects("Table1").ListColumns(3).DataBodyRange.Select
Case "Cat6"
ActiveSheet.ListObjects("Table1").ListRows(4).Range.Select
Case "Cat7"
ActiveSheet.ListObjects("Table1").HeaderRowRange(3).Select
Case "Cat8"
ActiveSheet.ListObjects("Table1").DataBodyRange(3, 2).Select
Case "Cat9"
ActiveSheet.ListObjects("Table1").TotalsRowRange.Select << This Line HIGHLIGHT with Yellow After Debug
Case Else
'Do Nothing
End Select
End Sub
Last edited: