brauche mal wieder einen Tip von Euch.
Die MsgBox in folgender Procedure war nur mal zum Test.
Sie zeigt an:
"ComboBox1 ComboBox"
"ComboBox2 ComboBox"
"ComboBox8 ComboBox"
"ComboBox24 ComboBox"
Das ist o.K. so, weil in dem Frame1 nur diese ComboBoxen enthalten sind.
Mir geht es um das Ermitteln der Nummer (nr).
Nach dem Motto "ComboBox8" - "ComboBox" = "8"
Wie mache ich das?
Private Sub test()
Dim c As Control
Dim nr As Integer
For Each c In Me.Frame1.Controls
If TypeName(c) = "ComboBox" Then
MsgBox c.Name & " " & TypeName(c)
'nr = c.Name - TypeName(c)
End If
Next c
End Sub
Gruß Jens