Sayın Hocalarım
comboBox tan seçtiğim bölüme göre listbox a excel liste sayfasında sütünlardan kendi seçeceğim 4 sütuu almak istiyorum kod yardımı lütfen
Private Sub ComboBox1_Change()
If ComboBox1 = "A" Then ListBox1.RowSource = "A2:D" & Cells(65536, "A").End(3).Row
If ComboBox1 = "B" Then ListBox1.RowSource = "E2:H" & Cells(65536, "E").End(3).Row
If ComboBox1 = "C" Then ListBox1.RowSource = "I2:L" & Cells(65536, "I").End(3).Row
If ComboBox1 = "D" Then ListBox1.RowSource = "M2:P" & Cells(65536, "M").End(3).Row
End Sub
Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "A"
.AddItem "B"
.AddItem "C"
.AddItem "D"
End With
ListBox1.ColumnCount = 4
End Sub
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.