Respective Selected Items to be displayed in Listbox as per the current record

  • Hi all



    Greetings



    Sending you the attached xl.macro enabled file



    I want to display the items selected ONLY from list box which needs to be stored in Array.



    if you look at the textbox_change when i type few letters the list box pouplates items as per the
    requirement.



    I choose and select the items in Listbox for Record 1(as per the value in Textbox)
    The SELECTION should be stored in an array (Not necessary all the items i will select)



    When i press the Next or Previous button : the items in listbox as per the array should be displayed
    in the listbox for that particular record i.e(cur%).



    so when you press Next or Previous you see the record of Cur% in the Text box or Value of Board$(cur%)



    I want to see the record of Board$(cur%) with respective selection in Listbox



    Your Help is very much appreciated



    Thanks



    Subir

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Hello Pike


    To be more clear


    1. When i type the Board Values from Sheet in Text1.text the values in Listbox1.values are displayed. Kindly see the "Import" sheet.
    2. The Listbox1 appears with Items that i want to Select
    3. Now I would like to Select the Items from Listbox1. for eg i select any Three item if i type "SSC" in Textbox1
    4. How Do i store the Selected/Checked Item From ListBox1 in an Array
    5. Now very Crucial
    When i Press Next I type in Textbox1.Text the value "ICSE" and i select any Two items of ICSE in the ListBox1 which gets stored in Array
    (you can try the same in textbox1 by typing and pressing the next and Previous command buttons to see current record of Textbox1
    In similar way when Next and Previous buttons are pressed the ListBox1 values should be displayed with the Selected values of that Current record of Textbox1.


    Hope this Clarifies


    Thanks


    Subir

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    something like

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Its a bit clunky but you can refine the syntax


    try...

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Hi Pike


    No success with above code you sent.


    Error at First Instance
    "subscript out of range"


    Code
    Public Sub Text_Current_Display(cur%) 
       ........
    TextBox1.Text = board$(cur%)
     .......


    How about trying the below which i picked up from http://www.ozgrid.com/forum/showthread.php?t=173486



    Basically I want to display the Selected Items in List box of Each Current Record i.e cur% of Board$
    i.e when Previous cmd button clicked or cmd button next button
    I am not able to put the correct logic or code to show the Selected items in listbox of each current record typed in Textbox

    Thanks

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Sorry for the above mess Seems Wrong Tagging


    Option1



    Option 2



    Basically i want to select the Institutes (items in Listbox) for that Cur% record of Board i.e Board$(cur%)
    When Next and Previous Records are pressed the selected items or ticked marked items should be displayed of that Board$(cur%)


    Thanks
    Subir




    EDIT
    The "above mess" were posts with HTML formatting tags inside code tags, deleted.

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Pike


    Sorry


    Have checked with your file . There are errors.




    I am altogether attaching a new file. Please Run it and see whats happening by Pressing the Command Buttons
    Have added here the combo box and Selecting items from combobox which is = to Textbox1.


    The Listbox1 then acts as per Textbox


    Command buttons Next and Previous are pressed but the Items in listbox disapaears. somtimes it appaears sometime it does not.
    We need to correct it
    After the correction as i desire that the display of selected institutes are displayed as per the Textbox1 Board$(cur%) record by pressing the previous and next buttons.


    Thanks
    Subir

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Hi


    Kindly check the following



    Please help me with the questions asked in the procedures itself


    Thanks

  • Re: Respective Selected Items to be displayed in Listbox as per the current record


    Thanks Pike


    FYI I've not used Toggle Button. May i know why you have used Toggle Button ?


    It is confussing when Pressing Toggle Button and rest other Command Buttons.
    Something is really happening but due to confussion not able to understand what is that really happening.


    Regards


    Subir

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!