+ Reply to Thread
Results 1 to 5 of 5

Select listbox items and edit in VBA

  1. #1
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Microsoft 365 Apps
    Posts
    518

    Select listbox items and edit in VBA

    I have a problem with my listbox edit sub. Userform contains 3 textboxes to add/update/delete items (3 columns) to a list box. The items in the list are stored in a sheet. I want the user to select any item from the list and update the items from the textboxes. The textboxes populate the listbox selection. The code works to populate except that 1.) when an item is selected, the actual update is applied to the last item in the row and not the user selected item from the listbox.
    Please Login or Register  to view this content.
    Best regards.
    Last edited by terriertrip; 06-28-2017 at 02:45 PM. Reason: simplification

  2. #2
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Microsoft 365 Apps
    Posts
    518

    Re: Select listbox items and edit in VBA

    I've simplified the problem. Can anybody help with this, please??

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Select listbox items and edit in VBA

    Can you provide the workbook? With userforms especially, it is very hard for us to re-create the environment to see what is going on...
    Clean out any sensitive data, we just need a few rows of random data, and the userform in question.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Select listbox items and edit in VBA

    You need to set miRowNo_Current to the row the data has come from and you can probably do that by using the ListIndex property of the listbox.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Microsoft 365 Apps
    Posts
    518

    Re: Select listbox items and edit in VBA

    Thanks, Norie! That works perfectly.

+ 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] Add, Edit, Delete items in dynamic listbox
    By zvonacfirst in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-17-2017, 03:59 AM
  2. Edit ListBox Items
    By Boechat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2016, 10:53 AM
  3. is it possible to edit items of a listbox in excel VBA
    By maggie_xio in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-03-2015, 05:46 AM
  4. Select & edit items in a listbox in VBA
    By poppy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2014, 04:47 PM
  5. [SOLVED] Auto select items in a Listbox with items from another Listbox
    By perducci in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-22-2013, 04:45 PM
  6. VBA edit listbox items on userform
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 03:51 AM
  7. Select, Edit, Add & Delete items in a list box
    By baisty182 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2010, 07:25 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