kompl. Code zum besseren Verständnis
21.01.2003 22:36:37
H.- Udo
Zum besseren Verständnis hab ich Euch hier meinen kompletten Code kopiert.Private Sub OptionButton1_Click()
Dim Suchwort As String
Dim Suchwort2 As String
Dim i, i2, i3, LoD As Long
Suchwort = OptionButton1.Caption
For i = 1 To 1000
If Cells(i, 2).Value = Suchwort Then Exit For
Next i
For i2 = i To 1000
If Cells(i, 11).Value = OptionButton1.Caption Then
i2 = i2 + 1
Suchwort2 = Cells(i2, 11).Value
Exit For
End If
Next i2
For i3 = i To 1000
If Cells(i3, 2).Value = Suchwort2 Then Exit For
Next i3
With Worksheets("Werte")
For LoD = i To i3
If .Cells(LoD, 3).Interior.ColorIndex = 41 Then
For s = 11 To 20
UserForm3.Controls("OptionButton" & CStr(s)).Caption = Cells(LoD, 3).Value
Next s
End If
Next LoD
End With
ComboBox1.Visible = True
For t = 1 To 10
UserForm3.Controls("OptionButton" & CStr(t)).Visible = False
Next t
For u = 11 To 20
UserForm3.Controls("OptionButton" & CStr(u)).Visible = True
Next u
End Sub
Gruß
H.- Udo