Hey everyone,
Something really simple here that is giving me some hard time! I guess I just don't understand the way it works!
I have 2 combo box on my form
-cmbExp1
-cmbExp2
Now, I need to print with a msgbox the selected value of cmbExp1 and cmbExp2. It works if writing the code like this: msgbox(cmbExp1.value). But what I want is to use a loop because in reality the number of combo boxes will change.
So, here's what I have :
temp = 2
For i = 1 To temp
MsgBox ("cmbExp" & i & ".Value")
Next
The result is : cmbExp1.value! I don't understand the logic behind that!
Sincerely,
Something really simple here that is giving me some hard time! I guess I just don't understand the way it works!
I have 2 combo box on my form
-cmbExp1
-cmbExp2
Now, I need to print with a msgbox the selected value of cmbExp1 and cmbExp2. It works if writing the code like this: msgbox(cmbExp1.value). But what I want is to use a loop because in reality the number of combo boxes will change.
So, here's what I have :
temp = 2
For i = 1 To temp
MsgBox ("cmbExp" & i & ".Value")
Next
The result is : cmbExp1.value! I don't understand the logic behind that!
Sincerely,