ComboBox value?

  • Thread starter Thread starter dksaluki
  • Start date Start date
D

dksaluki

I'm writing code in a module, and I want to get the value of a certain
ComboBox that I've added to Sheet1 tab. Is that possible, or can I
only reference the combobox while writing code IN THE PRIVATE SUB for
that control? ....as in:

Private Sub ComboBox1_Change()

//somewhere in here only

End Sub

If i'm outside the sub, how do i reference it? is it something like,
Sheet(1).Shapes(".....")....something something....?

I'd appreciate any help.

dck
 
hi.
the default value of the combo box is the value property..meaning that
whatever the user selects is the value of the combo box..ie...
Private Sub ComboBox1_Change()
if combobox1.value = "something" then
xlrun_some_code
else
xldo_something_else
end if

another concept....
dim something as stirng
combobox1.value = something
msgbox something

.....meaning you can declare the value of the combobox1 within the sub_change
event and in more than one way.
be creatiive.

regards
FSt1
 
Back
Top