+ Reply to Thread
Results 1 to 9 of 9

List Box is not refreshing

  1. #1
    Registered User
    Join Date
    08-11-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    14

    List Box is not refreshing

    Hi all,

    I am a beginner in Excel VBA. I've problem with my list box in Userform VBA whereby my list box is not refreshed in everytime I searched for another ID. Is that any solutions to refresh my list box in everytime I clicked for new search?

    I've attached my file at here...

    Many thanks in advance~
    Attached Files Attached Files
    Last edited by Excel_Kidz; 08-29-2011 at 08:09 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: List Box is not refreshing

    Do you mean clear previous items from the Find All listbox?

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-11-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: List Box is not refreshing

    Where should I put the codes as above in the FindAll listbox to clear previous data and go for new search?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: List Box is not refreshing

    In the cmbFindAll_Click event.

    I smply added the clear command to you existing code.

  5. #5
    Registered User
    Join Date
    08-11-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: List Box is not refreshing

    Sorry that my problem still exist... I've inserted the codes as you given to me... but still not clearing...
    Attached Files Attached Files
    Last edited by Excel_Kidz; 08-29-2011 at 08:11 AM.

  6. #6
    Registered User
    Join Date
    08-11-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: List Box is not refreshing

    I did try to apply it in my Findall event but still can't refresh my list box

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

    Re: List Box is not refreshing

    Looks like the clear code works fine, but you've (MRA) changed the code so that it duplicates Column A
    Hope that helps.

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

    Free DataBaseForm example

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: List Box is not refreshing

    You are not clearing the variable MyArray, so it can contain the result of previous searches.

  9. #9
    Registered User
    Join Date
    08-11-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: List Box is not refreshing

    Hmmm, what should i do to make the findall event refresh the listbox in every search? thx

+ 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