+ Reply to Thread
Results 1 to 3 of 3

update text box value on changing the combo box value

Hybrid View

barishta update text box value on... 08-18-2009, 01:43 PM
royUK Re: update text box value on... 08-18-2009, 01:48 PM
barishta Re: update text box value on... 08-18-2009, 02:45 PM
  1. #1
    Registered User
    Join Date
    08-17-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    update text box value on changing the combo box value

    The attached user form works fine until i select the combo box values from drop down menu (by clicking) but it wouldn't be possible to keep on selecting combo box value from drop dowm menu (by clicking) as the original file has over 3500 enteries. So i prefer entering the combo box values manually and this is the point where i start facing problems :-(

    e.g if i enter a5 (which doesn't persists in the range) in the combo box; it'll show "1" in the text box rather then showing nothing

    Please Fix this up for me (if possible do something like if i would add anything like a5 [which doesn't persists in the range] it would pop out a message "not in list"




    Please help me out guys.



    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: update text box value on changing the combo box value

    Use the listIndex property of the combobox
    Private Sub ComboBox1_Change()
    Dim Rw As Long
    Rw = Me.ComboBox1.ListIndex + 2
    On Error GoTo 1
    TextBox1 = Cells(Rw, 2).Value
    Label1 = ComboBox1
    1 End Sub
    Note: add 2 to allow for listindex starts at 0 plus header row
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-17-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: update text box value on changing the combo box value

    Now when i enter a5 in the combo box it shows tt (column b header) in the text box (i did change the code)

    and doesn't that message box pop out thing possible ?

    And

    ??Note: add 2 to allow for listindex starts at 0 plus header row ?? :-- sorry didn't get you

    (i would be very great to you if you would make these changes to the attached sheet and upload it.)


    Anyways thanks for you help
    Last edited by barishta; 08-18-2009 at 02:50 PM.

+ 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