I thought that the following statements were trivial:
Dim cbox As ComboBox
cbox = my_control_box1
'my_control_box1 is a recognized ComboBox in a UserForm
I want to pass the cbox variable to a function declared like this:
Public Function load_values(Acbox As ComboBox)
The problem: in the debugger, I can see that VBA gives a string value to my_control_box1...
Exactly as if the first statement was: cbox = my_control_box.Value !
This is not what I want. I want to refer to the object, not to a content of that object.
Could anybody indicate me how to load an object type in a variable?
Thank you!
Bart
Dim cbox As ComboBox
cbox = my_control_box1
'my_control_box1 is a recognized ComboBox in a UserForm
I want to pass the cbox variable to a function declared like this:
Public Function load_values(Acbox As ComboBox)
The problem: in the debugger, I can see that VBA gives a string value to my_control_box1...
Exactly as if the first statement was: cbox = my_control_box.Value !
This is not what I want. I want to refer to the object, not to a content of that object.
Could anybody indicate me how to load an object type in a variable?
Thank you!
Bart