Need Userform combobox to be visible when textbox equals a number value?

jtemp57

New Member
Joined
Nov 11, 2013
Messages
6
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:
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
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,584
Messages
6,125,666
Members
449,248
Latest member
wayneho98

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