+ Reply to Thread
Results 1 to 9 of 9

Edit Data with Userform Listbox

  1. #1
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    118

    Edit Data with Userform Listbox

    Hello, I've manage to create a userform with a listbox that has 2 variables, "Restaurants" (Combobox1) and "Month" (Combobox2).

    i have 12 sheets for each month and in each sheet i got 5 different restaurant data tables.

    So with the userform i can see the data from different restaurants in different months, but now i want to be able to edit that data trough the listbox.

    I've tried but cant make it work.

    i attached a sample for you to understand better.

    PS: the data that i need to edit is the table between column CD:CJ

    Any help is appreciated,
    Best regards,
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Edit Data with Userform Listbox

    Please post a working spreadsheet.

    There is No button to Show the Userform.

    There is no Overview Sheet so the Userform will not open.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    118

    Re: Edit Data with Userform Listbox

    Sry, this one is working.

    The button is on the overview sheet named "Test userform"
    the original file was to big to upload so i had to remove some stuff
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Edit Data with Userform Listbox

    I have edited your code quite a bit.

    Your code was over complicated.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    118

    Re: Edit Data with Userform Listbox

    hello, thank you so much for the time you spent, as you may have noticed i am trying to learn by my self to code in excel and ive not yet have the skill to organise or use the full potential of VBA.

    ATM im not at home, but as soon i get there i will test it and inform you.

    Thank you once more, you really help me out.

    Best regards

  6. #6
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    118

    Re: Edit Data with Userform Listbox

    hello, i've tried the code and it's kinda working, there is only 2 errors,

    When i try to select "OlhaOutro" or "IvãoDois" from combobox1 its gives me an error "Permission denied" and the same error if i try to change any value with "IvãoDois" or "OlhaOutro" selected in the combobox1.

    Also when i change any value it seems its offset one cell to the right.

    Thank you in advance

  7. #7
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    118

    Re: Edit Data with Userform Listbox

    I manage to get the last part working,

    Please Login or Register  to view this content.
    Originally it was N instead of N-1

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Edit Data with Userform Listbox

    Apologies

    I forgot to delete one instance of RowSource. ( Please try to avoid using it).

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    118

    Re: Edit Data with Userform Listbox

    Thanks again, really appreciate the time you spent.

    Best regards,

+ 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] Allow users to edit or add to previously entered Listbox selections in UserForm
    By lorikgator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2015, 05:01 PM
  2. [SOLVED] userform listbox edit
    By syedmehdi in forum Excel General
    Replies: 2
    Last Post: 04-02-2015, 08:43 AM
  3. [SOLVED] ListBox Userform add, edit, save help.
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2014, 09:55 AM
  4. 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
  5. VBA edit listbox items on userform
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 03:51 AM
  6. 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
  7. 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

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