Makro schreibweise
09.01.2017 15:36:33
Sigi
ich habe mal eine Frage wegen der schreibweise im Code.
Was sprich gegen die unten aufgeführte Art?
For Each obj In Controls
Select Case TypeName(obj)
Case "Frame":obj.Visible = False
Case "TextBox": obj.Value = ""
Case "ComboBox": obj.Clear
End Select: Next obj
Private Sub ComboBox1_Enter(): Application.Run "Pruef": End Sub
Private Sub ComboBox2_Click(): TextBox1.SetFocus: End Sub
For li = 1 To 21: .Controls("TextBox" & li).Value = ""
If CheckBox1.Value = True Then: Textbox1.setFocus: Else Textbox2.setFocus
Danke!
Gruß
Sigi