Add to Combo Control from referenced worksheet object

M

Matt

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.AddItem 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top