+ Reply to Thread
Results 1 to 5 of 5

Selecting Row in ListBox and editing cell values

  1. #1
    Registered User
    Join Date
    10-25-2014
    Location
    Walsall, England
    MS-Off Ver
    2010
    Posts
    39

    Selecting Row in ListBox and editing cell values

    Hi Guys
    I'm afraid I need your expertise once again. I am a virtual Zero when it comes to ListBoxes. I have a small userform which displays on a listbox all valid results. That part I was able to do. What I'm trying to achieve is to select a specific row in the listbox, add a number in TextBox2 and then It will remove from the quantity in column 5 which will change the cell value as well and finally refreshing the list with the new result?
    I looked everywhere and I almost did it but after 3 days, I decided I don't have enough skills.
    Thanks for your help, as usual.
    Attached Files Attached Files
    Last edited by tony75; 07-14-2020 at 09:58 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Selecting Row in ListBox and editing cell values

    Can you provide a results page with what you expect, like walk us through an example?

  3. #3
    Registered User
    Join Date
    10-25-2014
    Location
    Walsall, England
    MS-Off Ver
    2010
    Posts
    39

    Re: Selecting Row in ListBox and editing cell values

    Sure. In the Userform, if I type "1042." in textbox1, it will add by vba "XXX" wich the code will search all rows in sheet "SPARES", Column A, all matches of "1042.XXX". In this Case. in the listbox, it will be displayed Rows 8, 9 and 12. Let's say I want to take a certain quantity from the row I select In the listbox, row 8 for example. In the SPARES sheet, Column D, it has 75. My goal is to type "5" in textbox2 and once I click "TAKE THE QTY ABOVE" button, it will remove those 5 out of the 75 in total, updating the cell to 70 and displaying the new result in the listbox. please let me know if that is clear enough?
    Thanks

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Selecting Row in ListBox and editing cell values

    See if the attached satisfies.
    I have replaced the textbox with a combobox - this loaded with filtered one of each initial type.
    selection of type then loads the listbox with all items in group.
    because the listbox filtered group loses its sheet row reference this has to be re-established by a small search routine.
    any queries post back on this site
    torachan
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-25-2014
    Location
    Walsall, England
    MS-Off Ver
    2010
    Posts
    39

    Re: Selecting Row in ListBox and editing cell values

    It works perfectly, thanks torachan
    The only thing not working is the image load, but I'm sure I can figure out a way.
    Thank you once again!

+ 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. [SOLVED] Pre-selecting Listbox value from cell value in Userform
    By peterchclarke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2019, 08:26 AM
  2. [SOLVED] Show unique values in listbox and activate related cell if i select value in Listbox
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2018, 06:54 AM
  3. Allow cell selecting but disable manual cell editing
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2016, 09:06 AM
  4. click listbox values to populate data entry form for editing records
    By junmacs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2014, 05:08 PM
  5. Editing listbox items in Dblclick event freezes Excel unless mouse moves over listbox
    By muneebmansoor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-28-2013, 02:21 PM
  6. Editing cell from selected items in listbox
    By Feloni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 08:01 AM
  7. Editing Code: Selecting multiple items in a cell via data validation
    By baker2145 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 06:13 PM

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