Hi guys/ladies,
I have a userform with 4 combobox. The data selected in each combobox are then linked in a String variable (LaneID) at a button_clik event.
This button then search LaneID in a Range on the worksheet, through a for cycle. Whene the LaneID is matched, the cell is selected, and the selection is used to calculate a formula.

The problem is that if LaneID is not found, so it is not matched by any string in the Range, I don't have an error message! This is wrong because, in this case, I would like the user to know that LaneID is not existing, and so he has to select other values with the ComboBox.

Thank you in advance for your help!

Here is the code:

------------------------------------------
Private Sub CalculateButton_Click()

Dim PartialCost As Single
Dim TotalCost As Single
Dim LaneID As String
Dim LaneIDcode2 As Range

LaneID = Me.Cbo1.Value & "-A-" & Me.Cbo2.Value & "-" & Me.Cbo3.Value & "-" & Me.Cbo4.Value

For Each Cell In Worksheets("Sheet1").Range("LaneIDcode2")
If Cell.Value = LaneID Then
Cell.Select
End If
Next

PartialCost = (Selection.Offset(0, 1).Value * Me.Tbo1) + (Selection.Offset(0, 2).Value * Me.Tbo2.Value)

TotalCost = PartialCost * 2

Me.TboTotalCost.Value = CSng(TotalCost)

'error handling if LaneID is not found in the Range?

End Sub
------------------------------------------