I've a method **querylistboxitems** and i want to call this method in several click events, only difference is listbox,dropdown values change based on the event i call.
And i'm calling this in the buttion click event by passing the listbox names as **List_Compare** and **Select_CM_Compare**
But the values passing to the function are not control names, control values i.e corresponding control selected values.
I want to use listbox name in **lstbox**, not the value.
Code:
Public Sub querylistboxitems(lstbox As listbox, dropdown As ComboBox)
Dim drpdwnvalue As String
drpdwnvalue = dropdown.Value
With lstbox
//do something
End with
End Sub
Code:
Private Sub Command_compare_Click()
Call querylistboxitems_1(List_Compare, Select_CM_Compare)
End Sub
I want to use listbox name in **lstbox**, not the value.