#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default ComboBox value?

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default ComboBox value?

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

"dksaluki" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox into another combobox girlie New Users to Excel 1 September 26th 06 10:31 AM
combobox changes value flow23 Excel Discussion (Misc queries) 0 May 11th 06 04:44 PM
ComboBox Abs Excel Discussion (Misc queries) 3 February 15th 06 02:05 AM
COMBOBOX smiley New Users to Excel 1 October 12th 05 02:01 PM
Combobox M Excel Discussion (Misc queries) 1 March 7th 05 10:29 AM


All times are GMT +1. The time now is 07:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"