userform, 2 comboboxes and a textbox

Maverikk

New Member
Joined
Jul 6, 2009
Messages
5
Hi, I am struggling with a combobox on a userform. I need 2 cascading comboboxes and a textbox. Obviously the data in combobox 2 is dependent upon the choice made in combobox 1. Then the user can type anything in the textbox. But, depending on the choice made in combobox2 - the text/value in the textbox must be entered into a particular cell relevant to the choice. Almost like a linked cell that changes by the choice made in combobox2. Can anyone help with some code please? Thanks alot.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Thanks Datsmart - I will give them a go. Thanks for your quick reply - I have been going round in circles on google for days on end! Cheers.
 
Upvote 0
This thread has good code on dependant Combo Boxes on page 9.
http://www.mrexcel.com/board2/viewtopic.php?p=154#154

Erik, Norie, and Jindon have good code suggestions in this thread:
http://www.mrexcel.com/board2/viewtopic.php?t=152281

I have found that the code on http://www.mrexcel.com/forum/showthread.php?t=82306 works just as I need it. However, do you know how to get a textbox to reference a particular cell depending on the option used in combobox 3? I have tried (unsuccessfully)

Sheets("sheet3").Cells(1, 1) = ComboBox3.Value

or

textbox1.visible = true
textbox1.value = sheet3!a1

etc etc. any help would be great. I only want the textbox to appear once combobox3 has been selected, and the entry in that textbox to be put into a cell. Cheers.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top