I need to be able to have my combobox become visible once a number value is placed in a textbox on a userform.
Here is where the textbox gets its data from:
I need the textbox data mentioned above to be able to make my combobox visible if the value is a number. Here is what I have so far but it is not working?
Thanks
Here is where the textbox gets its data from:
Code:
Private Sub UserForm_Initialize()
Dim Cell As Range
Dim Rng As Range
With ActiveSheet
Set Rng = .Range("O8:P51")
Set Cell = Rng.Columns(1).Find("*", , xlValues, xlWhole, xlByRows, xlPrevious, False, False, False)
If Not Cell Is Nothing Then
HazardFactor_TextBox = Cell.Item(1, 1)
MinIsoMethod_TextBox = Cell.Item(1, 2)
Else
HazardFactor_TextBox = ""
MinIsoMethod_TextBox = ""
End If
End With
End Sub
I need the textbox data mentioned above to be able to make my combobox visible if the value is a number. Here is what I have so far but it is not working?
Code:
Private Sub ComboBox_IsoMethodSelected_Change()
If Me.HazardFactor_TextBox.Value > 29 And Me.MinIsoMethod_TextBox.Value = "DB&B" Or Me.MinIsoMethod_TextBox.Value = "Single Valve" Then
Me.ComboBox_IsoMethodSelected.Visible = True
Me.AddIsolationMethod.Visible = True
Exit Sub
End If
End Sub
Thanks