+ Reply to Thread
Results 1 to 7 of 7

VBA To populate listbox with duplicate item by increasing the item quantity

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    VBA To populate listbox with duplicate item by increasing the item quantity

    Hi all

    I have attached my sample file. I have re-posted this "month old" post as there have been no results. I have reached a stumble block and have no idea how to proceed further. This is the last part of a 3 month project.

    I have managed to allow my code to move items from one listbox to another....The listboxes gets populated from Sheets 1 & 2.
    What I want to achieve when I press the Process command button is the following:

    1. The ListBox selection highlighted which is moved to the other side, must be found in the corresponding sheet for that listbox and moved to the other sheet as per with the Listbox move.
    2. The ListBox selection highlighted must be found in Sheets("Temp") and the transaction number in column B must be changed to the transaction no of the Sheet it went to.

    My file works as follows:

    On opening, UserForm1.Shows
    Click [open table] Click [David Table1]
    Table 1 will now be populated in listbox1
    Click [split bill]
    Table1 will now be populated in Listbox2
    Click [To open Table to split]
    Click [David Table2]
    Table 2 will now be populated in ListBox3

    You will notice the two individual transaction no's above each listbox i.e 20160929322 & 20160929323
    Highlight Banana Shake in ListBox2 and click[>] to move it to ListBox3
    Now the magic needs to happen.
    1.ListBox3's already existing 1 Banana Shake must now be increased to 2.

    When I click [Process]
    2. The Banana Shake info must be deleted from Sheets("1") and copied to Sheets("2"), however, it already exists, so the item must just be increased by 1 in other words Banana Shake Qty must become 2

    3. The Banana Shake for this Table's transaction no i.e. 20160913323 must be found on Sheets("temp"), be increased to 2 and then Banana Shake from transaction 20160929322 must be deleted.

    I sincerely hope someone can assist. Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA To populate listbox with duplicate item by increasing the item quantity

    So only table 1 and 2 can splt the bill ?


    Cheers
    Leo

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: VBA To populate listbox with duplicate item by increasing the item quantity

    Hi Leo

    Thanks for your response. No...any Table needs the capability of a Bill Split and I forgot to mention that the item could not necessary be a duplication. If it is a different item, then it should just process as per normal.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: VBA To populate listbox with duplicate item by increasing the item quantity

    Is anyone able to assist with my problem....

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA To populate listbox with duplicate item by increasing the item quantity

    not ready yet
    this is 1 of the possibilities


    Cheers
    Leo
    Attached Files Attached Files

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: VBA To populate listbox with duplicate item by increasing the item quantity

    Hi Leo

    Wow, some serious code....I like what I see. Going to spend some time and analyze to see what you are doing.
    Thanx for the effort you are putting in this.

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: VBA To populate listbox with duplicate item by increasing the item quantity

    Leo

    You are the man....I just incorporated the first part of the code into my POS System and it works like a bomb.....
    Now just to have code to make changes to the Temp sheet....I'm also trying my utmost to understand that part.

+ 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. Populate Textbox from offset cells when selecting listbox item
    By Glherriott in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-30-2016, 02:00 AM
  2. Replies: 6
    Last Post: 01-13-2015, 05:42 PM
  3. fifo value by item computed from observed quantity-by item and-purchase information
    By shifty911 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2014, 06:44 PM
  4. I want to populate a listbox with a combobox selected item.
    By Bailers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2014, 06:42 AM
  5. [SOLVED] Item in ListBox (search) to populate UserForm with values
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-12-2013, 04:47 AM
  6. [SOLVED] Deleting Duplicate item in listbox
    By zicktechnology in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 05:57 AM
  7. Populate ListBox Based On Item Chosen In Another ListBox
    By davemojo82 in forum Excel General
    Replies: 1
    Last Post: 08-04-2009, 08:39 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