MFish
Board Regular
- Joined
- May 9, 2019
- Messages
- 76
Hi there,
I have two comboboxes that will NEED to go into two separate columns. I need the code to run if the two comboboxes have both been picked exactly the same on the sheet before moving forward... I tried writing this code and it doesn't work with concatenating.
Any thoughts on how I can run a duplicate validation on two cells next to eachother and if those match what I just have in the two comboboxes?
I have two comboboxes that will NEED to go into two separate columns. I need the code to run if the two comboboxes have both been picked exactly the same on the sheet before moving forward... I tried writing this code and it doesn't work with concatenating.
Code:
Range("B7:C7").Select
'Check for duplicate bill name
Do Until UCase(ActiveCell) = UCase(cmbLH) & UCase(cmbLeg) Or ActiveCell = ""
ActiveCell.Offset(1, 0).Select
Loop
If ActiveCell <> "" Then
MsgBox "" & cmbLH & cmbLeg & " already exists in the Table. Please choose a different Line Haul Number", _
vbOKOnly, "Duplicate Line Haul Number detected"
frmAdd.Show
Exit Sub
Else: End If
Any thoughts on how I can run a duplicate validation on two cells next to eachother and if those match what I just have in the two comboboxes?
Last edited by a moderator: