' the name of a control given the corresponding VBControl object' (accounts for items in control arrays)Function VBControlName(vbc As VBIDE.VBControl) As String Dim index As Long index = vbc.Properties("Index") If index < 0 Then VBControlName = vbc.Properties("Name") Else VBControlName = vbc.Properties("Name") & "(" & CStr(index) & ")" End IfEnd Function