Dependent combobox1 and combobox2

Rvittur

New Member
Joined
Mar 8, 2023
Messages
20
Office Version
  1. 365
Platform
  1. Windows
I have 2 comboboxes, which I would like to have combobox2 dependent on combobox1 selection. I have combobox1 with a named ranged listed with dates. For combobox2 I have 7 different named ranges for it it based off combobox1 selection. So if date selected is 3/13 combobox2 list is for Monday (named range), 3/14 combobox2 is Tuesday etc.. these named ranges for combobox2 is coming from another workbook.

I've tried select case but not sure if I'm doing it right. Currently the combobox1 is populated with dates.
 
Got it with this
With ws

.Cells(lRow, 2).Value = UserForm1.CmdEmployeeName.Value
.Cells(lRow, 3).Value = UserForm1.cmdDate.Value
.Cells(lRow, 1).Value = UserForm1.cmdTimeStart.Value
.Cells(lRow, 5).Value = UserForm1.cmdSuitDown.Value
.Cells(lRow, 7).Value = UserForm1.txtNotes.Value
.Cells(lRow, 4).Value = UserForm1.cmdDLRFLR.Value
.Cells(lRow, 6).Value = UserForm1.cmdTSC.Value
.Cells(lRow, 8).Value = UserForm1.TextBox1.Text

End With

If UserForm1.cmdSuitDown.Value <> "" And UserForm1.cmdTSC.Value <> "" And UserForm1.cmdDate = "3/20" Then
Set f = ws1.Range("D:D").Find(UserForm1.cmdSuitDown, , xlValues, xlWhole, , , False)
If Not f Is Nothing Then
ws1.Range("C" & f.Row).Value = UserForm1.cmdTSC.Value
f.Interior.Color = vbYellow
End If
End If

If UserForm1.cmdDate.Value = "3/20" Then
wb.Worksheets("Roadmap").Activate
ws1.Cells(mRow, 3).Value = UserForm1.cmdTimeStart.Value
ws1.Cells(mrow1, 4).Value = UserForm1.CmdEmployeeName.Value

End If
 
Upvote 0
Solution

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,592
Messages
6,179,786
Members
452,942
Latest member
VijayNewtoExcel

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