+ Reply to Thread
Results 1 to 6 of 6

ListBox Userform add, edit, save help.

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    ListBox Userform add, edit, save help.

    Hi guys,

    This seems a bit complicated, but I hope someone can help me. I figure out a way to organise my data which is to use Define Name. Because my data is 2 columns, 1st column is ID of the product, and 2nd colunm is the price to it. And these items are associated to an ID # which is the Define Name.

    I have multiple request in here.

    1) I want to be able to display the rowsource in the listbox1 from the choice made from combobox1.

    2) If the inventory has been changed, then the user can choose to edit that ID#. In that edit mode, the user can choose to edit directly from the listbox (if possible because it's faster), or have to edit 1 by 1 with a textbox example. Also, if the user decide to add more ID product, it will be added to the next data of the same define name.

    3) If the ID# is not available in the inventory, then the user can choose to add new inventory. This will add a new define name and a new data will be be store to the next available rows in the spreadsheet.

    Finally, the spreadsheet is used to store the data, so I don't want the user with less knowledge to manipulate the whole inventory. That is why I prefer them to use the userform instead, more friendly.

    Here is the template of the userform to start with:
    listbox_sample.xlsm

    Please help anyone.

    Thank you.!!

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: ListBox Userform add, edit, save help.

    of course there many approaches, but as a start you can try this:
    -you need two listboxes on yr UserForm, Listbox1 and Listbox2 and a ComboBox
    -in Sheet2 add the first range, let's say range A (yr first range)
    -in Sheet3 add the 2nd range, lets' say range B (yr 2nd range)
    this is the code for ComboBox1
    Please Login or Register  to view this content.
    this is for UserForm
    Please Login or Register  to view this content.
    now you need the code for adding item in range A or B and edit what you want, it's some work for it....
    hope it helps you or it gives a right direction?!
    Last edited by john55; 08-04-2014 at 06:04 AM.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: ListBox Userform add, edit, save help.

    add item in ListBox1 and 2
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    and so on...

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: ListBox Userform add, edit, save help.

    see if it helps you

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: ListBox Userform add, edit, save help.

    Perfect!!! Thank you very much!

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: ListBox Userform add, edit, save help.

    you're welcome! glad I could helped you!

+ 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. Edit Listbox, save changes to Excel
    By fdsaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 09:14 AM
  2. Populate row value in userform textboxes, edit and save the changes back in sheet.
    By p_nayak268 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2013, 07:48 PM
  3. VBA edit listbox items on userform
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 03:51 AM
  4. select multiple column listbox to edit userform
    By tbar05 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2012, 12:13 AM
  5. Edit listbox selected items and save to workbook???
    By madforit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2012, 08:00 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