+ Reply to Thread
Results 1 to 14 of 14

fixing "unspecified error"populate data in listbox based on textbox search

  1. #1
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    fixing "unspecified error"populate data in listbox based on textbox search

    hi experts
    I need help to fixing error unspecified error in this line
    HTML Code: 
    when I search in text box based on COL D
    I hope some body help .
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-02-2018
    Location
    Italy
    MS-Off Ver
    2013-2019
    Posts
    31

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    1. You cannot delete a listbox that you have valued with the RowSource, you have to reset the RowSource:
    Please Login or Register  to view this content.
    2. You cannot resize (ReDim) a two-dimensional array, this produces an error.

  3. #3
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    thanks
    You cannot resize (ReDim) a two-dimensional array, this produces an error.
    how fix it ,please?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    Change UserForm_Initialize code to
    Please Login or Register  to view this content.
    Last edited by jindon; 09-18-2021 at 09:13 AM.

  5. #5
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    @jindon thanks that's better . but there is problem . it doesn't show formatting of numbers and currency in columns which contains number as in earlier . may you fix it,please ?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    Change to
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    @jindon thanks again . and sorry because I ask that . do me favor please ? when I search in textbox based on COL D it 's gone the number formatting and currency . how fix that ?also last thing I would cancel show date in first col in listbox
    HTML Code: 
    just replace for it sequences numbers 1,2,3 whether when run the userform or search in textbox
    thanks for your cooperation .

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    1) add one line in "Initialize" code
    Please Login or Register  to view this content.
    2) change "FilterData" to
    Please Login or Register  to view this content.
    this should also avoid adding blank row(s) after filter
    Last edited by jindon; 09-18-2021 at 10:18 AM.

  9. #9
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    @jindon ok that's better . about numbers sequences in COL 1 in list box I disable this line
    HTML Code: 
    but still shows date . it should show 1,2,3
    HTML Code: 
    Last edited by Mussa-A; 09-18-2021 at 10:18 AM.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    2nd code in post #8 has been updated, so try.

  11. #11
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    yes this is good but should also show when run the userform when show data in listbox
    thanks again

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    Do you wan to serial number instead of dates?
    change that line to
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    exactly . you provide me a great help today .
    thanks so much for every thing .
    have a good night !

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: fixing "unspecified error"populate data in listbox based on textbox search

    One more change
    delete ".AddItem" within the loop
    Please Login or Register  to view this content.

+ 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] Improve speed to populate Listbox based on a Textbox entry
    By mamaexcel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-07-2018, 04:50 AM
  2. [SOLVED] Populate listbox based on a database search using a textbox
    By Dotreena in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 01-25-2018, 06:22 AM
  3. [SOLVED] VBA userform search for listbox entry based on Textbox value
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-12-2015, 08:29 AM
  4. VBA - Adding Search to Listbox based on Textbox value
    By nimesh29 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2014, 06:47 PM
  5. [SOLVED] Need to populate data in listbox based on textbox value change
    By Naveed Raza in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-20-2014, 07:10 AM
  6. [SOLVED] Populate a Listbox in a UserForm based on a Search Result
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 07-17-2013, 07:53 PM
  7. [SOLVED] populate textbox from a listbox when data contains either decimals or cel properties
    By Djeetn069 in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 04-02-2012, 04:58 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