+ Reply to Thread
Results 1 to 7 of 7

Using Userform Listbox for data management/editing

  1. #1
    Registered User
    Join Date
    06-04-2015
    Location
    South East UK
    MS-Off Ver
    2013
    Posts
    28

    Using Userform Listbox for data management/editing

    Hi All,
    I'm looking for some help/guidance.
    I've attached a sample workbook, whereby I want to be able to edit worksheet data from a userform. I've managed to pull and populate the listbox correctly, but I am now getting stuck trying to not only select the data in the listbox but also to change it. I was working on it late last night, thinking it would be fairly easy, but I soon noticed it wasn't, and I had a bit of a problem searching for help as I don't know all of the correct excel terminology. At some stage, I will have a read up on the terminology so that I know EXACTLY what an ARRAY is and what it's used for.

    In the meantime, if anyone could have a look and give me some pointers in the right direction, that would be great.

    Thanks all
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Using Userform Listbox for data management/editing

    Absolute simplest way to 'link' a listitem to the worksheet is to include another column (can be hidden) in the listbox that holds the row number for that item. You can then refer to the row if you want to edit the data - add another userform laid out for data entry, use the row number to populate the controls and update the sheet afterwards.

  3. #3
    Registered User
    Join Date
    06-04-2015
    Location
    South East UK
    MS-Off Ver
    2013
    Posts
    28

    Re: Using Userform Listbox for data management/editing

    Ok, I can see the logic in that and will give it a try later. How would I go about make a hidden column?

  4. #4
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Using Userform Listbox for data management/editing

    Obviously increase the column count... then use sometihng like
    Please Login or Register  to view this content.
    in the debug window to get the existing widths - it'll return the current widths like "30 pt;170 pt;60 pt;40 pt". Use that as a 'template' (you don't need to add 'pt')
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-04-2015
    Location
    South East UK
    MS-Off Ver
    2013
    Posts
    28

    Re: Using Userform Listbox for data management/editing

    Ah I see, quite cunning, I like that

  6. #6
    Registered User
    Join Date
    06-04-2015
    Location
    South East UK
    MS-Off Ver
    2013
    Posts
    28

    Re: Using Userform Listbox for data management/editing

    I've had a go, and I seem to be getting VERY close. However, I can't get the data to pass across.

    I've attached the latest version, is there an obvious mistake?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-04-2015
    Location
    South East UK
    MS-Off Ver
    2013
    Posts
    28

    Re: Using Userform Listbox for data management/editing

    Does anyone have any idea what I'm missing?

+ 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] Update sheet data when editing ListBox items
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2015, 02:16 PM
  2. 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
  3. Transfer Data From One Userform Listbox to Another Userform Listbox with 11 columns
    By sparkoft in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2013, 10:54 AM
  4. 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
  5. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  6. Editing Data Through A Userform
    By WoodsyMP5K in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2012, 02:30 AM
  7. Display a UserForm based on Data selected in another UserForm's ListBox
    By RPhilbin83 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-26-2011, 11:35 AM

Tags for this Thread

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