+ Reply to Thread
Results 1 to 3 of 3

Changing text box control sources via combo box values

  1. #1
    Registered User
    Join Date
    03-15-2007
    Posts
    2

    Changing text box control sources via combo box values

    I want the user-chosen value in a combo box to determine the control source for a text box. I thought it would be as simple as:

    Private Sub TextBox1_Change()
    If AB1 = "January" Then
    TextBox1.ControlSource = C5
    ElseIf AB1 = "February" Then TextBox1.ControlSource = C6
    ElseIf AB1 = "March" Then TextBox1.ControlSource = C7
    ElseIf AB1 = "April" Then TextBox1.ControlSource = C8
    End If
    End Sub

    Where AB1 is the control source for the combo box. Apparently it's not that simple - I'm not getting any debugging errors, but it just doesn't seem to work.
    Any suggestions?

  2. #2
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    is C5 to C8 referring to a range on a worksheet if so then this shoud work,

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-15-2007
    Posts
    2
    Still not working - not getting an error, but the text box value is still not showing up.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1