+ Reply to Thread
Results 1 to 6 of 6

Uncooperative list box

  1. #1
    Registered User
    Join Date
    03-09-2010
    Location
    Cerritos, CA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Uncooperative list box

    Community,

    I have a listbox named (lstTALLEYWHSE) that doesn't want to behave correctly. The control is populated from a range on a worksheet linked to the rowsource property. The list has duplicate values in the first column on nearly every occasion. When the user makes a selection in the listbox, the first column value in the listbox populates to a cell on a worksheet to be used as a look up variable for a formula. The listbox selection also populates a "Label4".

    Callout No.

    JM801000284C1 CEQ.31963 Purcell,2000001397,,DISCONTINUED USE,CEQ.14176,14in Plinth A… 1.0 Yes On Release On Pick 1.0 06/15/2015 - 122076.8015.150615.LA0738.3551015684
    JM801000284C1 CEQ.32407 Raycap Inc.,DC12-48-60-RM,,,,Pluggable; upgradable,rack-moun… 1.0 Yes On Release On Pick 1.0 06/15/2015 - 122076.8015.150615.LA0738.3551015684
    JM801000284C1 CEQ.11612 Ericsson,UCRRUS11B12-48,,,,RRUS11 B12 700; 5MHz BW;,2x30W,-4… 1.0 Yes On Release On Pick 1.0 06/15/2015 - 122076.8015.150615.LA0738.3551015684
    JM801000284C1 CEQ.13160 Ericsson,UC6601ODDUS41A,,,,RBS6601 Outdoor DUS41; SAU;,GPS,,… 1.0 Yes On Release On Pick 1.0 06/15/2015 - 122076.8015.150615.LA0738.3551015684

    I have the following code in the lstTALLEYWHSE Change Event:

    Please Login or Register  to view this content.

    What's happening is that when the user clicks one of the list items on the form in the listbox; and if column 1 contains duplicates, the highlighted cursor selection in the listbox "jumps" to the very first occurrence of the duplicate instead of remaining on the selected item by the user.

    Any ideas?

    Thank you in advance!

    pt

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Uncooperative list box

    Do you have any other userform code that references lstTALLEYWHSE? If yes can you show it?

    I suspect you have another event procedure that is changing the lstTALLEYWHSE.Value.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-09-2010
    Location
    Cerritos, CA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Uncooperative list box

    Nothing else is referencing the listbox listTALLEYWHSE. This listbox is on a form named frmOrderDetailsshow and this form opens up from a double click event off of another listbox in a separate userform. The code to call up the frmOrderDetailsshow form is below:

    Please Login or Register  to view this content.
    I'm stumped. The workbook is too large to upload. If you have any possible workarounds or suggestions I can play with, I'll give it a go and let you know the results.

    Best,

    pt

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Uncooperative list box

    I don't have any other ideas.

    Can you upload an example workbook with a limited amount of data just to illustrate the problem? No need for it to be a big file.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Uncooperative list box

    Using RowSource to populate the listbox is probably at the root of the problem.
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    03-09-2010
    Location
    Cerritos, CA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Uncooperative list box

    Solved it. Thank you All.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 04-22-2014, 03:30 PM
  2. Replies: 0
    Last Post: 01-09-2013, 11:44 AM
  3. [SOLVED] Taking a list of tasks and a list of subtasks and creating a new list with groupings
    By kknb0800 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2012, 12:16 PM
  4. Replies: 3
    Last Post: 07-20-2012, 09:52 AM
  5. Uncooperative Print Area
    By trikki in forum Excel General
    Replies: 1
    Last Post: 11-12-2009, 07:14 PM

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