Hi all,
I can't see what is wrong with my code:
MyRange is a two column table on Sheet1 (an actual XL table). I have it firing as a 'Userform_initialize' event if that matters?
Please Login or Register to view this content.
Hi all,
I can't see what is wrong with my code:
MyRange is a two column table on Sheet1 (an actual XL table). I have it firing as a 'Userform_initialize' event if that matters?
Please Login or Register to view this content.
What is wrong with the code?
Are you getting errors? Incorrect results?
If posting code please use code tags, see here.
Hi Norie,
Apologies, that was an oversight. I receive the RTE 1004 (application/object undefined error).
On the whole line...
How can your combobox have a value when the form is being loaded?
What's MyRange - the address of a range or a Range object?
Anyone who confuses correlation and causation ends up dead.
That's true. I never thought of that. MyRange is reference to an Excel Table (excluding the headers).
If it's a Range object, then you just use:
but of course that won't fix the other issue.Please Login or Register to view this content.
I see. Thanks romper - I'll sort the other issue out. I'll connect it to a Multipage_change event or something.
You could have other code in the Initialize event to assign a value to the combobox - just depends what you're trying to achieve.
What I am trying to do is:
- User selects a value from a ComboBox1
- Textbox1 is populated according to vLU based upon value in CB1
I tried assigning it to ComboBox1_Change() event but I got a RTE13 'Type error mismatch'
That probably means the value isn't being found - what kind of data is it - numeric/date/text?
Alphanumreric.
Can you post a sample workbook?
Here you go Romper (thanks for your help).
MyTable is the name of your table, not a Range object, so you need:
BTW you can call me Rory, rather than Romper.Please Login or Register to view this content.
Hi Rory,
Excellent! Thank you very much. It makes perfect sense.
BTW sorry for the lateness of my reply. I never received the auto-email stating there was a reply!
Thank you very much.
No worries - glad to help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks