Consulting

Results 1 to 3 of 3

Thread: Cell C3 changes Textbox

  1. #1
    VBAX Regular
    Joined
    Aug 2011
    Posts
    19
    Location

    Unhappy Cell C3 changes Textbox

    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
    Last edited by lovett10; 08-24-2011 at 06:22 AM.

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Use Select Case. Press F1 in or near a word in the VBE to get help.

  3. #3
    VBAX Regular
    Joined
    Aug 2011
    Posts
    19
    Location
    Quote Originally Posted by Kenneth Hobs
    Use Select Case. Press F1 in or near a word in the VBE to get help.
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •