Tabii Haliil hocamızınki tabi kısa kod.
Dim dic As Object, sonstr As Long
Private Sub ComboBox1_Change()
Set dic = CreateObject("scripting.dictionary")
With Sayfa3
sonstr = .Cells(.Rows.Count, "h").End(xlUp).Row
Me.ComboBox3.Clear
For x = 2 To sonstr
dic.Add Val(.Range("H" & x).Value), .Range("G" & x).Value
Next x
sonstr = .Cells(.Rows.Count, "d").End(xlUp).Row
getir sonstr, "d", "e", Me.ComboBox3, .Name
sonstr = .Cells(.Rows.Count, "a").End(xlUp).Row
getir sonstr, "a", "b", Me.ComboBox4, .Name
End With
Set dic = Nothing
End Sub
Sub getir(son As Long, alan1 As String, alan2 As String, cbo As MSForms.ComboBox, sayfa As String)
With ThisWorkbook.Sheets(sayfa)
cbo.Clear
For x = 2 To sonstr
If dic(Val(ComboBox1.Value)) = .Range(alan1 & x).Value Then cbo.AddItem .Range(alan2 & x).Value
Next
End With
End Sub
Private Sub UserForm_Initialize()
sonstr = Sayfa3.Cells(Sayfa3.Rows.Count, "h").End(xlUp).Row
Me.ComboBox1.List = Sayfa3.Range("h2:h" & sonstr).Value
End Sub