ComboBoxen zurücksetzen
12.10.2004 13:49:05
Jens_Pu
brauch wieder mal Unterstützung.
Ich möchte die ComboBoxen von verschiedenen Frames mit Hilfe einer Schleife zurücksetzen. Wie bekomme ich die Schleife für die Frames hin? Siehe Kommentarzeile: so sollte es m. E. sein. Geht aber nicht.
Private Sub CommandButton3_Click() 'ComboBoxen zurücksetzen
Dim frname As String
Dim c As Control
Dim f As Variant
Dim frames() As Variant
frames = Array(1, 2, 3, 5)
For Each f In frames
frname = "Me.Frame" & f
For Each c In Me.Frame1.Controls
' For Each c In frname.Controls '<---
If TypeName(c) = "ComboBox" Then
c.ListIndex = -1
End If
Next c
Next f
End Sub
Tips?
Gruß Jens