16.08.2014, 19:15
Hallo, nach längerem schreiben an meinem noch nicht fertig Projekt "Kegeln",
hab ich etliche Zeilen mit der Endung "False" und "True",
bzw. Txt_W01 = "" bis Txt_W20 = "" und dann noch Txt_WR01 = "" bis Txt_WR20 = ""
Kann man solche Anweisungen nicht eventuell in kleine Pakete packen: Einzeiler pro Hauptname der Gruppe ( Txt_W; Txt_WR; Lbl_W; Lbl_WR ) ???
Ein paar Beispielcodeschnipsel
oder vorab für konstruktives Helfen, Danke
hab ich etliche Zeilen mit der Endung "False" und "True",
bzw. Txt_W01 = "" bis Txt_W20 = "" und dann noch Txt_WR01 = "" bis Txt_WR20 = ""
Kann man solche Anweisungen nicht eventuell in kleine Pakete packen: Einzeiler pro Hauptname der Gruppe ( Txt_W; Txt_WR; Lbl_W; Lbl_WR ) ???
Ein paar Beispielcodeschnipsel
Code:
Private Sub CboSpiel_Change()
Dim i As Integer
Dim tb As TextBox
With UserForm1.CboSpiel
If .Value <> "" Then
UserForm1.Txt_SpID.Value = .List(.ListIndex, 1)
UserForm1.Txt_gesWurfKeg.Value = .List(.ListIndex, 3)
UserForm1.Txt_Runden.Value = .List(.ListIndex, 2)
Else
UserForm1.Txt_SpID.Value = ""
UserForm1.Txt_gesWurfKeg.Value = ""
UserForm1.Txt_Runden.Value = ""
End If
UserForm1.Txt_W01.Visible = False
UserForm1.Txt_W02.Visible = False
UserForm1.Txt_W03.Visible = False
UserForm1.Txt_W04.Visible = False
UserForm1.Txt_W05.Visible = False
UserForm1.Txt_W06.Visible = False
UserForm1.Txt_W07.Visible = False
UserForm1.Txt_W08.Visible = False
UserForm1.Txt_W09.Visible = False
UserForm1.Txt_W10.Visible = False
UserForm1.Txt_W11.Visible = False
UserForm1.Txt_W12.Visible = False
UserForm1.Txt_WR01.Visible = False
UserForm1.Txt_WR02.Visible = False
UserForm1.Txt_WR03.Visible = False
UserForm1.Txt_WR04.Visible = False
UserForm1.Txt_WR05.Visible = False
UserForm1.Txt_WR06.Visible = False
UserForm1.Txt_WR07.Visible = False
UserForm1.Txt_WR08.Visible = False
UserForm1.Txt_WR09.Visible = False
UserForm1.Txt_WR10.Visible = False
UserForm1.Txt_WR11.Visible = False
UserForm1.Txt_WR12.Visible = False
UserForm1.Lbl_W01.Visible = False
UserForm1.Lbl_W02.Visible = False
UserForm1.Lbl_W03.Visible = False
UserForm1.Lbl_W04.Visible = False
UserForm1.Lbl_W05.Visible = False
UserForm1.Lbl_W06.Visible = False
UserForm1.Lbl_W07.Visible = False
UserForm1.Lbl_W08.Visible = False
UserForm1.Lbl_W09.Visible = False
UserForm1.Lbl_W10.Visible = False
UserForm1.Lbl_W11.Visible = False
UserForm1.Lbl_W12.Visible = False
UserForm1.Lbl_WR01.Visible = False
UserForm1.Lbl_WR02.Visible = False
UserForm1.Lbl_WR03.Visible = False
UserForm1.Lbl_WR04.Visible = False
UserForm1.Lbl_WR05.Visible = False
UserForm1.Lbl_WR06.Visible = False
UserForm1.Lbl_WR07.Visible = False
UserForm1.Lbl_WR08.Visible = False
UserForm1.Lbl_WR09.Visible = False
UserForm1.Lbl_WR10.Visible = False
UserForm1.Lbl_WR11.Visible = False
UserForm1.Lbl_WR12.Visible = False
' UserForm1.Label1.Visible = False
' UserForm1.Label2.Visible = False
' UserForm1.Label3.Visible = False
' UserForm1.Label4.Visible = False
End With
End Sub
Code:
If CboSpiel = "2 auf die Vollen" Then
UserForm1.Txt_W01.Visible = True
UserForm1.Txt_W02.Visible = True
UserForm1.Lbl_W01.Visible = True
UserForm1.Lbl_W02.Visible = True
ElseIf CboSpiel = "gr.H.nr." Then
UserForm1.Txt_W01.Visible = True
UserForm1.Txt_W02.Visible = True
UserForm1.Txt_W03.Visible = True
UserForm1.Lbl_W01.Visible = True
UserForm1.Lbl_W02.Visible = True
UserForm1.Lbl_W03.Visible = True
ElseIf CboSpiel = "kl.H.nr." Then
UserForm1.Txt_W01.Visible = True
UserForm1.Txt_W02.Visible = True
UserForm1.Txt_W03.Visible = True
UserForm1.Lbl_W01.Visible = True
UserForm1.Lbl_W02.Visible = True
UserForm1.Lbl_W03.Visible = True
End If
'----------------------------------------------------
If CboSpiel1 = "Dreihunderteins" Then
UserForm1.Txt_W01.Visible = True
UserForm1.Txt_W02.Visible = True
UserForm1.Txt_W03.Visible = True
UserForm1.Txt_W04.Visible = True
UserForm1.Txt_W05.Visible = True
UserForm1.Txt_W06.Visible = True
UserForm1.Txt_W07.Visible = True
UserForm1.Txt_W08.Visible = True
UserForm1.Txt_W09.Visible = True
UserForm1.Txt_W10.Visible = True
UserForm1.Lbl_W01.Visible = True
UserForm1.Lbl_W02.Visible = True
UserForm1.Lbl_W03.Visible = True
UserForm1.Lbl_W04.Visible = True
UserForm1.Lbl_W05.Visible = True
UserForm1.Lbl_W06.Visible = True
UserForm1.Lbl_W07.Visible = True
UserForm1.Lbl_W08.Visible = True
UserForm1.Lbl_W09.Visible = True
UserForm1.Lbl_W10.Visible = True
ElseIf CboSpiel1 = "Fünfhunderteins" Then
UserForm1.Txt_W01.Visible = True
UserForm1.Txt_W02.Visible = True
UserForm1.Txt_W03.Visible = True
UserForm1.Txt_W04.Visible = True
UserForm1.Txt_W05.Visible = True
UserForm1.Txt_W06.Visible = True
UserForm1.Txt_W07.Visible = True
UserForm1.Txt_W08.Visible = True
UserForm1.Txt_W09.Visible = True
UserForm1.Txt_W10.Visible = True
UserForm1.Txt_W11.Visible = True
UserForm1.Txt_W12.Visible = True
UserForm1.Txt_WR01.Visible = True
UserForm1.Txt_WR02.Visible = True
UserForm1.Txt_WR03.Visible = True
UserForm1.Lbl_W01.Visible = True
UserForm1.Lbl_W02.Visible = True
UserForm1.Lbl_W03.Visible = True
UserForm1.Lbl_W04.Visible = True
UserForm1.Lbl_W05.Visible = True
UserForm1.Lbl_W06.Visible = True
UserForm1.Lbl_W07.Visible = True
UserForm1.Lbl_W08.Visible = True
UserForm1.Lbl_W09.Visible = True
UserForm1.Lbl_W10.Visible = True
UserForm1.Lbl_W11.Visible = True
UserForm1.Lbl_W12.Visible = True
UserForm1.Lbl_WR01.Visible = True
UserForm1.Lbl_WR02.Visible = True
UserForm1.Lbl_WR03.Visible = True
ElseIf CboSpiel1 = "Bingo" Then
UserForm1.Txt_W01.Visible = True
UserForm1.Txt_W02.Visible = True
UserForm1.Txt_W03.Visible = True
UserForm1.Txt_W04.Visible = True
UserForm1.Txt_W05.Visible = True
UserForm1.Lbl_W01.Visible = True
UserForm1.Lbl_W02.Visible = True
UserForm1.Lbl_W03.Visible = True
UserForm1.Lbl_W04.Visible = True
UserForm1.Lbl_W05.Visible = True
End If