reference parent position

This commit is contained in:
Paul Trowbridge 2019-01-16 14:48:19 -05:00
parent 144c0f85db
commit 0da2984907
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Exit Sub
Cancel = True
Dim i As Long
@ -29,7 +31,7 @@ Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean
For i = 1 To ci.Count
sql = sql & vbCrLf & "AND "
sql = sql & cd(piv_pos(cd, i)).Name & " = '" & ci(i).Name & "'"
sql = sql & cd(piv_pos(cd, ci(i).Parent.Position)).Name & " = '" & ci(i).Name & "'"
Next i
MsgBox (sql)