Dear All
I have a work book contain 5 sheets
i.e., Hojo1,Hojo2, Hojo3, Hojo4 and Hojo5.
Hojo1 contains a command button and the
other 4 sheets contains data(inventory stock data) and
when we click on commond button a user form appers with a combo box with following coding it will select the supplier
Private Sub ComboBox1_Enter ()
Dim i As Double
Dim final As Double
Dim tareas As String
ComboBox1.BackC olor = &H80000005
For i = 1 To ComboBox1.ListC ount
'Remove an item from the ListBox.
ComboBox1.Remov eItem 0
Next i
For i = 2 To 1000
If Hoja2.Cells(i, 4) = "" Then
final = i - 1
Exit For
End If
Next
'If ComboBox1.ListC ount < 1 Then
'ComboBox1.AddI tem "-"
For i = 2 To final
tareas = Hoja2.Cells(i, 4)
ComboBox1.AddIt em (tareas)
Next
'End If
End Sub
and followed by the command button1
i want when we click on command button 1 (Private Sub CommandButton1_ Click()
all the relevant data related to supplier will shown in new work book automatically.
Thanks
Regards
Kapil007
I have a work book contain 5 sheets
i.e., Hojo1,Hojo2, Hojo3, Hojo4 and Hojo5.
Hojo1 contains a command button and the
other 4 sheets contains data(inventory stock data) and
when we click on commond button a user form appers with a combo box with following coding it will select the supplier
Private Sub ComboBox1_Enter ()
Dim i As Double
Dim final As Double
Dim tareas As String
ComboBox1.BackC olor = &H80000005
For i = 1 To ComboBox1.ListC ount
'Remove an item from the ListBox.
ComboBox1.Remov eItem 0
Next i
For i = 2 To 1000
If Hoja2.Cells(i, 4) = "" Then
final = i - 1
Exit For
End If
Next
'If ComboBox1.ListC ount < 1 Then
'ComboBox1.AddI tem "-"
For i = 2 To final
tareas = Hoja2.Cells(i, 4)
ComboBox1.AddIt em (tareas)
Next
'End If
End Sub
and followed by the command button1
i want when we click on command button 1 (Private Sub CommandButton1_ Click()
all the relevant data related to supplier will shown in new work book automatically.
Thanks
Regards
Kapil007
Comment