+ Reply to Thread
Results 1 to 6 of 6

Listbox not meshing with spreadsheet

Hybrid View

crowmagnus Listbox not meshing with... 05-16-2017, 12:16 PM
Norie Re: Listbox not meshing with... 05-16-2017, 12:20 PM
crowmagnus Re: Listbox not meshing with... 05-16-2017, 12:28 PM
crowmagnus Re: Listbox not meshing with... 05-16-2017, 12:29 PM
crowmagnus Re: Listbox not meshing with... 05-16-2017, 12:38 PM
Norie Re: Listbox not meshing with... 05-16-2017, 12:39 PM
  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Listbox not meshing with spreadsheet

    I have a listbox and I'm going to add a delete button, the problem is that the listbox selection skips over the 3rd row and the index count doesn't register the 3rd row and all the next rows it labels as four. I don't know where the problem is so I'll be uploading an example workbook because I don't wan't to assume where the issue is. I am using this nearly exact code in another book and nothing seems out of the ordinary. any help is much appreciated!
    Attached Files Attached Files

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

    Re: Listbox not meshing with spreadsheet

    The listbox is showing what you are telling it to - the range A1:F8.

    I don't see anything being skipped and any values in the listbox are taken from the range I mentioned.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Listbox not meshing with spreadsheet

    When I scroll the listbox it skips a row in the spreadsheet and the listcounter stops at 4 but skips 3.

  4. #4
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Listbox not meshing with spreadsheet

    Sorry I worded that poorly, the highlighted selection in the listbox doesn't match the highlighted area in the spread sheet. when scrolled down through the list box, the highlighted area stops in the spreadsheet.

  5. #5
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Listbox not meshing with spreadsheet

    OMG... I figured it out, it's not counting duplicates... I had no idea it would do that.

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

    Re: Listbox not meshing with spreadsheet

    The reason for that is the duplicate rows - Find is only going to find the first duplicate eact time.

    Instead of using Find to get the row number on the sheet use the ListBox's ListIndex property.
        say = ListBox1.ListIndex + 1
        TextBox15.Value = say - 1
        Sheets("PD Database").Range("A" & say & ":F" & say).Select

+ 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. [SOLVED] ListBox linked to cells in spreadsheet
    By Anarchus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2017, 12:39 AM
  2. how to transfer information from a listbox to a spreadsheet
    By Gordonhk in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-04-2013, 09:55 AM
  3. Search Spreadsheet - Results in either listbox or new spreadsheet
    By Brandon Johnson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2006, 10:25 AM
  4. Copy Spreadsheet or listbox
    By Brandon Johnson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2006, 04:25 PM
  5. [SOLVED] How to get a listbox to move when scrolling down spreadsheet
    By kdunnSBLI in forum Excel General
    Replies: 1
    Last Post: 06-23-2005, 08:05 PM
  6. [SOLVED] Want listbox to move when scrolling down spreadsheet
    By kdunnSBLI in forum Excel General
    Replies: 3
    Last Post: 06-23-2005, 07:05 PM
  7. Update spreadsheet from Listbox
    By vseale in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2005, 01:06 AM

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