Advertisement
Advertisement
| 09.12.2008 at 07:38AM PDT, ID: 23726520 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: |
Private Sub FindOwnInstance()
Dim i As Long
Dim s As String
s = UserControl.Name
Dim Myhwnd As Long
Myhwnd = UserControl.hwnd
For i = 0 To UserControl.ParentControls.Count - 1
'
' IT IS THIS NEXT LINE OF CODE THAT IT CRASHES
'
If TypeOf UserControl.ParentControls.Item(i) Is ctlSplitterEx Then
If UserControl.ParentControls.Item(i).hwnd = Myhwnd Then
Set m_oMe = UserControl.ParentControls.Item(i)
Exit For
End If
End If
Next
Exit Sub
For i = 0 To UserControl.ParentControls.Count - 1
If TypeOf UserControl.ParentControls.Item(i) Is ctlSplitterEx Then
Set m_oMe = UserControl.ParentControls.Item(i)
Exit For
End If
Next
MsgBox ("Done.....FindOwnInstance")
End Sub
|