Combobox List
Combobox
List mengambil data cell di sebuah
sheets
Private Sub
UserForm_Initialize()
ComboBox1.List = Sheet2.Range("a4:a10").Value
End Sub
Private Sub
UserForm_Initialize()
ComboBox4.List = Sheet1.Range("E1:E10").Value
End Sub
Combobox List Multy
Combobox
List dari beberapa Combobox menggunakan kode array
Private Sub UserForm_Initialize()
For Jmlh = 1 To 10
Tanggal = Range("
A" & Jmlh)
Bulan = Range("B" & Jmlh)
Tahun = Range("C"
& Jmlh)
Next Jmlh
End Sub
Combobox List Transpose
Combobox
List Transpose artinya mengambil data cell kesamping
atau no kolom
Private Sub
UserForm_Initialize()
ComboBox1.List =
Application.Transpose(Sheet1.Range("D5:F5").Value)
End Sub
Combobox Null Value
Memberi
Nilai Kosong Untuk Semua Combobox Mulai Combobox Ke 1
Sampai Combobox Ke 5
Private Sub
CommandButton1_Click()
With UserForm1
For ni = 1 To 3
.Controls("pada combobox " & ni).Text
= ""
Next
End sub
Combobox Value
Nilai
Combobox1 Berasal Dari Nilai
Range("A1")
Private Sub
UserForm_Initialize()
Me.ComboBox1.Value =
Sheets("Sheet1").Range("A1").Value
End Sub
Combobox1.List Transpose
Combobox1.List Add Item Transpose
Private Sub
UserForm_Initialize()
ComboBox1.List =
Application.Transpose(ActiveSheet.Range("D5:O5").Value)
End Sub
ComboBox1_Change
Value
texbox atau data cell diambil dari value Combobox1
Private Sub
ComboBox1_Change()
Me.TextBox1.Text = Me.ComboBox1.Value
End Sub
Private Sub
ComboBox1_Change()
Sheets("Sheet1").Range("A1").Value =
Me.ComboBox1.Value
End Sub
Private Sub
ComboBox1_Change()
Label1.caption = userform2.ComboBox1.Value
End Sub
No comments:
Post a Comment