Hallo zusammen,
habe versucht mir eine Userform zu basteln, um sortieren zu können, nach 3 Kriterien.
Ich schaffe es nicht, irgendwas passt da nicht, offensichtlich!
Wäre super, wenn jemand von euch ein Blick drauf werfen könnte. Ich würde gerne den Code zum laufen bringen aber auch verstehen wo der Bug ist (wahrscheinlich die Bugs sind).
Vielen Dank
Salim
Private Sub CommandButton1_Click()
Dim a As Integer
Me.Hide
Set a = ComboBox1.Value
Set b = ComboBox2.Value
Set c = ComboBox3.Value
Set d = Optionsbutton1.Value 'ab- oder aufsteigend: wie baut man das ein?
Set e = Optionsbutton3.Value
Set f = Optionsbutton5.Value
Worksheets("Produits").Rows("3:5001").Sort _
Key1:=a, Order1:=xlAscending, _
header:=xlNo, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
Worksheets("Produits").Rows("3:5001").Sort _
Key2:=b, Order1:=xlAscending, _
header:=xlNo, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
Worksheets("Produits").Rows("3:5001").Sort _
Key3:=c, Order1:=xlAscending, _
header:=xlNo, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
If ComboBox1.Value "" Then ComboBox1.Value = ""
End If
If ComboBox2.Value "" Then ComboBox2.Value = ""
End If
If ComboBox3.Value "" Then ComboBox3.Value = ""
End If
If Optionsbutton1.Value "" Then Optionsbutton1.Value = ""
End If
If Optionsbutton2.Value "" Then Optionsbutton2.Value = ""
End If
If Optionsbutton3.Value "" Then Optionsbutton3.Value = ""
End If
If Optionsbutton4.Value "" Then Optionsbutton4.Value = ""
End If
If Optionsbutton5.Value "" Then Optionsbutton5.Value = ""
End If
If Optionsbutton6.Value "" Then Optionsbutton6.Value = ""
End If
End Sub
Private Sub CommandButton2_Click()
Me.Hide
ComboBox1.Value = ""
ComboBox2.Value = ""
ComboBox3.Value = ""
Optionsbutton1.Value = ""
Optionsbutton2.Value = ""
Optionsbutton3.Value = ""
Optionsbutton4.Value = ""
Optionsbutton5.Value = ""
Optionsbutton6.Value = ""
Unload.Me
End Sub