Posts by SubirMehta

    Anyone


    I am able to to smoothly do Previous and Next records of textbox records and Listbox records


    Now for eg


    for 1st set of records i select and add the (School) items in the Listbox
    for 2nd and 3rd also i repeat the same.


    No if i want to insert a record(Board) between 2nd and 3rd the problem is i am not able to do for the listbox
    eg
    when Inserted at 3rd record. The Listbox values of 3rd record should become empty and ready for New selection of record and When Next is Pressed it should show the list of 3rd record now as 4th Record.
    You can check for textboxes. It is working perfectly but need help for Listbox. Bascially everything moving Smoothly


    Attached is the File for reference


    Thanks in Advance


    Subir M.

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


    Sam


    Excellent Dear Friend. You have made my day.


    But now only one issue remains.
    for eg.
    1st record i select from the listbox and Press Next command
    for 2nd and 3rd i repeat the same lets say suppose for 4th record
    Suppose i dont select anything from listbox and i press next command.
    Guess What the textbox combobox record are not matching with each other for 4th and 5th.
    the Listbox shows the 0 record of 5th record and for 4th record it displays selected items of 5th record
    Can you help me this.
    Ideally the result should be for 4th record the listbox should be empty and for 5th record it should display its selected List


    By the way thank you so much for yours and Pike's real wonderful help.


    Thanks
    Subir

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


    Pike


    Really Thanks for everything. Your code is perfectly working well


    Actually i wanted specific things sending you new file.
    I've deleted some of the command buttons which was not really required


    Now i've shifted the code of cmdselectedAdd_click Button in Next click


    The reason was with one cmd_Next click
    1. Can read the current Record in the textbox and preared for next record to get entered
    1. So when i select the board from combobox which is typed in Textbox and its respective items are shown listbox
    I select them and it gets added and it
    2. Displays the SelectedRecords same in listbox1
    3. when i press next again for i am ready to do the same as i select the board from combobox typed in Textbox and its respective list is shown inlistbox . Again i select and it goes on


    Basically with Next and Previous commands wanted to see the added selected items for that particular record of textbox1. with respective selection in Listbox
    Everything happens simultaneously


    Frankly speaking i found sligthly bit inconvenient and confussed pressing Cmd_Add-select button and Next and Previous button
    Confussion : Did i press the next button to see the previous record of List items or did it match with my current record in Textbox


    Also can we remove LAbel2 and and label4



    I tried to combine in cmdNext the same but i got error in List_Current _Text
    Invalid Procedure Call or Argument
    and next time i clicked get error Subscript out of range


    Thanks
    Subir

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


    Pike


    Wonderful.


    Just one thing to add one more command button I.E Display All SelectedAdd Records and remove
    the following from cmdSelectAdd_click which is bold italics and highlighted



    basically from this command button
    i want the result for Sheet4



    attached file
    Regards


    Subir

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


    Sorry Pike


    You did not get me. i did not want to show Userform from the Module.


    But what i wanted was to display in another sheet all the the Records of SelectedAdd Data in another words
    want to display the Each Board (Record) with its Selected Added item (school) and area
    For eg.
    [TABLE="width: 245"]

    [tr]


    [TD="class: xl63, width: 64"]Board[/TD]
    [TD="class: xl63, width: 110"]School[/TD]
    [TD="class: xl63, width: 71"]Area[/TD]

    [/tr]


    [/TABLE]


    [TABLE="width: 245"]

    [tr]


    [td]

    ICSE

    [/td]


    [td]

    Shishuvan

    [/td]


    [td]

    Matunga

    [/td]


    [/tr]


    [tr]


    [td]

    ICSE

    [/td]


    [td]

    Bombay Scottish

    [/td]


    [td]

    Mahim

    [/td]


    [/tr]


    [tr]


    [td]

    SSC

    [/td]


    [td]

    Donbosco

    [/td]


    [td]

    Matunga

    [/td]


    [/tr]


    [tr]


    [td]

    SSC

    [/td]


    [td]

    DPYA

    [/td]


    [td]

    Dadar

    [/td]


    [/tr]


    [tr]


    [td]

    SSC

    [/td]


    [td]

    Auxilium

    [/td]


    [td]

    Wadala

    [/td]


    [/tr]


    [tr]


    [td]

    IB

    [/td]


    [td]

    SKN

    [/td]


    [td]

    Bandra

    [/td]


    [/tr]


    [tr]


    [td]

    CBSE

    [/td]


    [td]

    St. Dominic

    [/td]


    [td]

    Dadar

    [/td]


    [/tr]


    [/TABLE]


    Thanks
    Subir

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


    pike


    Thanks for making it easier.


    I get Run time Error '5' Invalid procedure call or argument
    i.e in Public Sub Text_Current_Display(cur As Long)
    ......ReDim NewArray(1 To mylist(cur).count, 1 To 3)
    i just pressed Next without adding.
    also it can happen that there will be items(Board$) with 0 Schools or Records. How can we make it smooth without run time error.


    Secondly what about the result in Sheet4 which i desired to display all the Added Selected items.


    Regards


    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


    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


    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


    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


    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

    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