View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default problem with a combo box in a worksheet

You may want to just bite the bullet and drop the linkedcell and rowsource and
replace them with code.

Souny wrote:

Tom,

Could you help me one thing?

I have a combo box in one of my worksheets, and the code for the combo box
is also in the same worksheet "Sheet1". Basically, the code will execute the
lines based on the value selected (from clicking) from the combo box.
Somehow, the code automatically executes when the file is opened.

I have tried many ways, and I am still having problems. I don't understand
why the code will automatically execute when the file is opened.

Below is my code structure.

Private Sub cboCode_Click()

Application.ScreenUpdating=False

Select Case cboCode.Value
Case "Selection1"
'Do the following
Case "Selection2"
'Do the following
Cash "Selection3"
'Do the following
Case Else
'Do the following
End Select

Application.ScreenUpdating = True
End Sub

Please help.

Thanks.

"Tom Ogilvy" wrote:

I depends on what you think the normal rules are.

right click on the combobox and select properties. in rowsource, the link
for the dropdown list, put something like

Sheet1!A1:A30

in Control source (the link for the result)
sheet2!B9

--
Regards,
Tom Ogilvy


"Andy the yeti" wrote:

Hi,

Due to some superb help from these groups I have almost achieved what I
wanted to do using a userform, I have one last hurdle now that involves using
a combo box on a userform.

Do these follow the rules of normal of combo boxes in regards to a cell link
and input range? If so could I have some pointers please on how to set up the
properties?

Thank you very much
Andy


--

Dave Peterson