1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| Private Sub ComboBox4_Change()
Tablo = Worksheets(ComboBox4.Text).Range("A4:J65535").Value
ListBox1.List() = Tablo
End Sub
Private Sub ListBox1_change()
'Tablo = Worksheets(ComboBox4.List(ComboBox4.ListIndex)).Range("A4:j65535").Value
'ListBox1.List() = Tablo
Sheets(ComboBox4.Text).Select
If ListBox1.Text = "" Then GoTo fin1
Sheets(ComboBox4.Text).Select
For Each c In Sheets(ComboBox4.Text).Range("A4:j65535")
If c.Value = ListBox1.Text Then
c.Select
End If
Next c
ActiveCell.Offset(0, 1).Select
TextBox2.Value = ActiveCell.Value
ActiveCell.Offset(0, 2).Select
ComboBox3.Value = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
ComboBox2.Value = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
ComboBox5.Value = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
TextBox11.Value = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
ComboBox1.Value = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
TextBox5.Value = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
TextBox6.Value = ActiveCell.Value
GoTo fin2
fin1:
TextBox2.Value = ""
TextBox5.Value = ""
fin2:
End Sub |
Partager