View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt[_41_] Matt[_41_] is offline
external usenet poster
 
Posts: 30
Default Add to Combo Control from referenced worksheet object

I have a workbook that contains a worksheet named "Sheet1"
on that worksheet I have a combo box (type: control toolbar) . I have
a little procedure that adds values to the combo box. When
I refer to the combo box as
thisworkbook.worksheets("Sheet1").combobox1.AddIte m i
or for that matter wkb.worksheets("Sheet1").comboBox1.Additem i
it works fine. However when I create a reference to a worksheet object
in thisworkbook
Such as:
set wkb = thisworkbook
set wks = wkb.worksheets("Sheet1")
wks.ComboBox1.AddItem i
and add an item, I get an error message. Does anyone know why that is?
Thanks,
Matt