View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jean-Paul Viel Jean-Paul Viel is offline
external usenet poster
 
Posts: 39
Default ComboBox Problem

Hi,



Your code should be on workbook Open not in activate.






--
JP

http://www.solutionsvba.com


"Tressa" <- wrote in message ...
Hello-

I have a combobox that is in an excel worksheet. I have code behind the
combobox (shown by view code). However when I exit the workbook and re

enter
it the code no longer works. The Combobox just shows the last value picked
and when you click on the down arrow it comes up blank.

I also received a runtime error 424 Object required.
I am not sure what I need to do to make it work. Does anyone have any
suggestions.

code:

Private Sub Worksheet_Activate()
'Sets initial values of each combobox

With ComboBox1
ComboBox1.AddItem "Yes"
ComboBox1.AddItem "No"

End With

End Sub

'This calls this initialization for each combobox
Private Sub ComboBox1_Click()
ComboBox1.DropDown
End Sub