Re: Is it possible to program a search for the buttons on the surface of the form?
Code:
Private Sub Form_Activate()
Dim ctrl As Control
Dim s As String
For Each ctrl In Me.Controls
With ctrl
s = s & .Name
On Error GoTo index_error
s = s & " (" & .Index & ")"
GoTo index_ok
index_error:
Resume index_ok
index_ok:
On Error GoTo 0
s = s & vbCrLf
End With
Next
MsgBox s
End Sub
Re: Is it possible to program a search for the buttons on the surface of the form?
Originally Posted by Argus19
Code:
Private Sub Form_Activate()
Dim ctrl As Control
Dim s As String
For Each ctrl In Me.Controls
With ctrl
s = s & .Name
On Error GoTo index_error
s = s & " (" & .Index & ")"
GoTo index_ok
index_error:
Resume index_ok
index_ok:
On Error GoTo 0
s = s & vbCrLf
End With
Next
MsgBox s
End Sub
---------------------------------------------------------
nice thank you