+ Reply to Thread
Results 1 to 6 of 6

Update data between two tables using userform vba

  1. #1
    Registered User
    Join Date
    05-06-2012
    Location
    Lisbon,Portugal
    MS-Off Ver
    Excel 2010
    Posts
    79

    Update data between two tables using userform vba

    Hi Everyone,
    I will be very thankful if you kindly help me the Excel vba which I have attached below.
    I have sent a form and some codes which I have copied from some other source.
    It will be thankful if you could kindly modify it for me.
    The goal is, any changes made in userform1, by "update Command",
    and through userform2, the change must be reflected in table1-Fruits and table2-Orange
    Some of the important conditions are:
    1.Selecting combobox1(choose month) should display on listbox1 all data of that month.
    2.Selecting a row, for example orange, on listbox1, and choosing "Update" command,
    will be open a second userform(2) to change data.
    3.With save command, the changing of data, must be automatic and should reflect in both tables,
    on table1-Fruits and table2-Orange simultaneously .
    Thank you in advance
    Attached Files Attached Files

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

    Re: Update data between two tables using userform vba

    I am trying to understand your two tables.
    Why are the left column numbers in 'Fruits' transferred to the right column in 'Oranges' and the right column numbers in 'Fruits' transferred to the left column in 'Oranges' ?
    torachan.

  3. #3
    Registered User
    Join Date
    05-06-2012
    Location
    Lisbon,Portugal
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Update data between two tables using userform vba

    Hi Torachan,
    Thanks for the quick response
    I do not know if it will make any sense, but it is to make the correspondence between them, which perhaps facilitates the vba code.
    In Table1, the first column corresponds to the order of entry, of the records of different types of fruit, and in Table2 it corresponds to a subtable of the specific fruit -Orange.

  4. #4
    Registered User
    Join Date
    05-06-2012
    Location
    Lisbon,Portugal
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Update data between two tables using userform vba

    hi
    I have not Power Query
    If you could offer any solutions, I would really appreciate it.
    Thank you

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

    Re: Update data between two tables using userform vba

    Give the attached a try.
    If you want to add a different fruit/item, first name a sheet tab, then add it to the master list (Fruits), ensure the spelling is identical.
    Open the form and you should see your new item in the combobox list, select it, then selected it from the listbox, alter the textboxes if you need to, press 'Update'.
    You now have a new table in your new sheet, the only sheet that actually updates is the master(Fruits), then the updated data is copied back as a complete table to the individual sheets.
    When adding to the master ensure first column contains row number - the search and updating uses this as a reference.
    Please note all the primary data is taken from the master list - there are no hard coded items required to fill the combobox it is all filtered from your actual data.
    Any queries post back on this site.
    torachan.
    Attached Files Attached Files
    Last edited by torachan; 05-25-2021 at 09:35 AM.

  6. #6
    Registered User
    Join Date
    05-06-2012
    Location
    Lisbon,Portugal
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Update data between two tables using userform vba

    Hi ToraChan,
    Very interesting indeed!
    Many Thanks for your disponibility of help.
    I will go to reflet to your project as to its functioning and as to the possible adjustment to my example test, and in any case if I have any doubts, I will take the liberty, if I allow it, to ask a clarify any doubts.
    Again my sincere thanks
    Solved

+ 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. Move data between listboxes on Userform and update tables on a worksheet
    By colin7 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-17-2019, 09:35 AM
  2. Do not update data tables when saving
    By nataliapel in forum Excel General
    Replies: 2
    Last Post: 10-10-2017, 09:32 AM
  3. [SOLVED] VBA to update pivot tables after data is populated
    By ChipsSlave in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2016, 12:10 PM
  4. [SOLVED] Use data dump to automatically update tables on other tabs
    By IronCladRooster in forum Excel General
    Replies: 8
    Last Post: 12-20-2014, 02:15 PM
  5. Links to data tables do not update
    By Rita Oliveira in forum Excel General
    Replies: 5
    Last Post: 08-30-2013, 07:54 AM
  6. Data tables update automatically with most recent data
    By jworkman7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2012, 03:54 PM
  7. link tables to update data automatically
    By nursekatie1978 in forum Excel General
    Replies: 2
    Last Post: 03-26-2011, 09:53 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