+ Reply to Thread
Results 1 to 6 of 6

combobox.value not working correctly, need help!

  1. #1
    Registered User
    Join Date
    07-13-2011
    Location
    Connecticut, USA
    MS-Off Ver
    Excel 2003
    Posts
    13

    combobox.value not working correctly, need help!

    I want when the user picks a value from the combobox in the user form for it to find that value in the range the list comes from and then offset it 3 cells over and display a corresponding value. This doesnt seem to be working, when I put an actually value you in for Me.cbo1.Value, say "24" it works perfectly. But the Me.cbo1.Value doesnt seem to be working. Any ideas?

    Please Login or Register  to view this content.
    Last edited by brykarc22; 07-14-2011 at 11:50 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: combobox.value not working correctly, need help!

    brykarc22,

    In the future, please wrap code in code tags. As to your question, assuming the combobox's list is populated using a RowSource, you could use the following:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

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

    Re: combobox.value not working correctly, need help!

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    Simple answer available, but add the tags
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    07-13-2011
    Location
    Connecticut, USA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: combobox.value not working correctly, need help!

    I copied that code and when I run it I get the error:
    Run-time error '1004'
    Method 'Range" of object '_Global' failed

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

    Re: combobox.value not working correctly, need help!

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  6. #6
    Registered User
    Join Date
    07-13-2011
    Location
    Connecticut, USA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: combobox.value not working correctly, need help!

    Okay I changed the one part in the code

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    The actual name of the range it came from and it worked perfectly. Im not exactly sure what the error was, and if you have an explaination for the error I'd love to know, but it works perfect now so thank you very much for your help and advice!

+ 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