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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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