Object Req error putting combobox value into a cell

Joined
Oct 7, 2011
Messages
4
Reaction score
0
Hello

I inserted a combobox into a spreadsheet and want to copy the selection into a cell.

The following is in Module1:

Private Sub FrCharDropdown_Change()
Range("c4").Value = FrCharDropdown.Value
End Sub

FrCharDropdown.value generates an Object Req error.
I've tried to reference it in a number of ways but keep getting this error.

Can anyone tell me what I'm doing wrong.

Thanks
 
Joined
Sep 3, 2008
Messages
164
Reaction score
5
Andrew,

Is the combobox linked to a cell? If not, right click on it for the properties.

Stoneboysteve
 
Joined
Oct 7, 2011
Messages
4
Reaction score
0
Unfortunately it populates the cell with the item number rather than the value.

I'd like to be able to reference the other properties of the dropdown in vb as well - so this has to be the way.
 
Joined
Sep 3, 2008
Messages
164
Reaction score
5
Andrew,

Have you tried entering msgbox FrCharDropdown.Value as the first line in the subroutine to see if there is a value?

If the error is Object Req, can you try FrCharDropdown.Object.Value

Or can you attach your spreadsheet?

Stoneboysteve
 
Joined
Sep 3, 2008
Messages
164
Reaction score
5
Andrew,

Did you use the combobox control from 'forms' or the control toolbar? If you used it from forms, try replacing it with the combobox from the control toolbar.

Stoneboysteve
 

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