wie kann ich alle Userforms in einem Workbook abklappern, ohne die Namen und die Anzahl der integrierten Userforms zu kennen.
For Each ....
Next
Danke im Voraus
Helmut
Dim lctrControl As Control
For Each lctrControl In Userform1.Controls
If TypeName(lctrControl) = "TextBox" Then
If TypeName(lctrControl) = "CheckBox" Then
If TypeName(lctrControl) = "Label" Then
'usw
Next
Sub sbUFs()
Dim lctrControl As Control
Load UserForm1
Load UserForm2
For i = 0 To UserForms.Count - 1
For Each lctrControl In UserForms.Item(i).Controls
If TypeName(lctrControl) = "TextBox" Then Beep
If TypeName(lctrControl) = "CheckBox" Then Beep
If TypeName(lctrControl) = "Label" Then Beep
Next
Next
End Sub