PDA

View Full Version : [SOLVED] Cell C3 changes Textbox



lovett10
08-24-2011, 05:34 AM
I would like to set this code so that:


If Cell C3 (Data Validation List)
="Boil1" then textbox1 = "MCB"
="Boil2" then textbox1 = "MCB"
="Boil3" then textbox1 = "MOTOR"

Heres what i have so far


Private Sub ComboBox1_Change()
Dim cbo As OLEObject
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
If ("C3") = "Boil1" Then
OLEObjects("TextBox1").Object.Value = "MCB"
Else
OLEObjects("TextBox1").Object.Value = "MOTOR"
End If
End Sub

Thanks in advance

Kenneth Hobs
08-24-2011, 06:15 AM
Use Select Case. Press F1 in or near a word in the VBE to get help.

lovett10
08-24-2011, 06:20 AM
Use Select Case. Press F1 in or near a word in the VBE to get help.

thanks