ComboxBox Rowsource value dependent on another combobox

gemcgraw

Board Regular
Joined
Mar 11, 2011
Messages
72
I'm working on a project that involves two (2) ComboBoxes, the RowSource value and two different worksheets, DB1 & DB2.

The RowSource value for ComboBox8, depends on the value of ComboBox1. ComboBox1.value points to either DB1 or DB2. There is also a range in either of these sheets that remains constant, regardless of what sheet is selected in ComboBox1 (Range D3:D103)

Example:

ComboBox1.value = DB1

Therefore:
ComboBox8.RowSource.value = ComboBox1.Value & (range constant of "!D3:D103") -OR- 'DB1!D3:D103'

I want the user to see all values in range D3:D103 on worksheet DB1, not DB2 populate in ComboBox8, on click.

My issue is, this sub doesn't work. No error return, no data. Not sure what the better coding would be or if this is possible.

Code:
Private Sub ComboBox8_Click()
    ComboBox8.RowSource.Value = ComboBox1 & "!D3:D103"
End Sub
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Scratch that. So sorry to those that have already looked at this. I see what I was doing wrong. As obvious as my grey hair. Have a good weekend everyone!
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,794
Members
449,468
Latest member
AGreen17

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