+ Reply to Thread
Results 1 to 12 of 12

Need to populate data in listbox based on textbox value change

  1. #1
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Need to populate data in listbox based on textbox value change

    Hi All

    I need help to making a userform, my userform contains (1 textbox , 2 labels , 1 listbox , 2 buttons(clear & cancel))

    I tried my best but i unable to make it perfect..

    I need help to populate data in listbox based on textbox change, below is my condition

    required column Headers in listbox is "Acno Nbr","investname","amount"

    - textbox contains only number if user enter text then msgbox should show plz enter numbers only & as well as in lable
    - our account nbr which we are enter in textbox that should be start from "9" if user enter number otherthan "9" , msg should show invalid number & as well as in lable
    - if user entering the number & whatever the number user enter listbox should populate required data whatever the account nbr starting with that number(textbox value)
    - suppose if user enter only lessthan 10 & greaterthan 10 then in lable show invalid number u have enter lenght of account nbr(textbox value)
    - suppose if textbox value is available in worksheet then in listbox populate the required data and in lable populate "yes it's power goal number"
    - suppose if textbox value is not available in worksheet then in lable show "no records found - might be its not a power goal number"

    i hope my explanation in clear & understandable & if not plz let me know

    plz see attached file..
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need to populate data in listbox based on textbox value change

    For starters,

    try this code ,

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need to populate data in listbox based on textbox value change

    Hi xlbiznes

    thanks for quick reply,

    but its meet 60% requirement, suppose if i enter "910" in textbox then listbox should show all the account nbr which is starting with 910 just like google search

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need to populate data in listbox based on textbox value change

    Here you go,


    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need to populate data in listbox based on textbox value change

    Hi xlbiznes

    xllent its working charms !! thanks...

    tommrow i will give u feedback after fully varified...

  6. #6
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need to populate data in listbox based on textbox value change

    Code added to your original file.
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need to populate data in listbox based on textbox value change

    Thanks for extremely nice support xlbiznes, its working xlent but i need small clarification.

    - suppose when i am entering otherthan 9 msgbox giving popup but when i pressing backspace again msgbox giving popup but that should not give.
    - when i am entering some numbers in textbox and listbox populating the values but again when i am pressing removing value in textbox then listbox not getting clear...

  8. #8
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need to populate data in listbox based on textbox value change

    Try this updated one with user input checking.
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need to populate data in listbox based on textbox value change

    Hi xlbiznes

    Wow !! now its perfect, a very big thank you so much , really u itself a programer

    Done ! my query got resolved now...

    Wish You Happy New Year

  10. #10
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need to populate data in listbox based on textbox value change

    You are welcome, glad i could help. Wishing you the same.

  11. #11
    Registered User
    Join Date
    03-08-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Need to populate data in listbox based on textbox value change

    Hi xlbiznes,

    i was just wondering, instead of having 9 as a common value, can you provide the code for user to enter any number on the textbox that would populate the listbox? thanks.

  12. #12
    Registered User
    Join Date
    03-08-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Need to populate data in listbox based on textbox value change

    Hi xlbiznes,

    i was just wondering, instead of having 9 as a common value, can you provide the code for user to enter any number on the textbox that would populate the listbox? thanks.

+ 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: 0
    Last Post: 08-19-2013, 05:12 AM
  2. [SOLVED] populate userform listbox from textbox input
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-05-2013, 10:05 AM
  3. Populate userform listbox based on value selected in another listbox
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2012, 05:16 PM
  4. [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
  5. update data based on listbox & textbox
    By SarahPintal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2010, 02:37 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