+ Reply to Thread
Results 1 to 4 of 4

Writing the loop for updating multi-table MS access file using multi-sheet excel

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    teh
    MS-Off Ver
    Excel 2010
    Posts
    19

    Writing the loop for updating multi-table MS access file using multi-sheet excel

    I imported the tables (DKt and DTt) from an ms access file to excel sheets (DKe and DTe), each table corresponds to one sheet. Now I want to update the ms file, when some changes happen in excel file. I wrote different loops for different worksheets and tables as shown in the code, but I have more than 8000 rows and it takes a long time to run.
    Is it the only way or there is another way to write the loop for all tables and worksheets? I also get an error, when I run the macro in a older version of microsoft (2013) for the line of
    Please Login or Register  to view this content.
    that
    Please Login or Register  to view this content.
    , how can I get result with different version? Here is my macro for updating the tables in ms file from excel sheets:

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Writing the loop for updating multi-table MS access file using multi-sheet excel

    Why not link the Excel tables to Access and then every time you make a change to the tables in Excel, they are automatically updated in Access. No need for loops or imports. Replace the tables in Access with the linked tables from Excel.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    teh
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Writing the loop for updating multi-table MS access file using multi-sheet excel

    Quote Originally Posted by alansidman View Post
    Why not link the Excel tables to Access and then every time you make a change to the tables in Excel, they are automatically updated in Access. No need for loops or imports. Replace the tables in Access with the linked tables from Excel.
    I also imported the tables from excel using External Data in access and Import the source data into a new table in the current database, but for updating the changes in access we need to write macro in excel to save those changes in access. If you mean another way without using macro can you please explain more?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Writing the loop for updating multi-table MS access file using multi-sheet excel

    Instead of pasting data into Access every time your excel sheet changes, link you excel tables to Access. They will appear in Access as tables if normalized.

    Look at this link and scroll down to the Link section.

    https://support.office.com/en-us/art...d-e084913cc958

+ 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. Put spread sheet on internet for multi user access
    By ka3pmw in forum Excel General
    Replies: 0
    Last Post: 07-24-2016, 08:59 AM
  2. Copy / Paste Values Only one sheet into another file from a multi sheet excel file
    By srisri201012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2013, 12:56 PM
  3. Replies: 19
    Last Post: 10-05-2012, 01:03 PM
  4. [SOLVED] Multi-user access to Excel
    By Bob in forum Excel General
    Replies: 7
    Last Post: 07-09-2012, 10:30 PM
  5. Writing multi conditional formula in excel
    By jayaprakashgulb in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-27-2011, 07:33 AM
  6. Multi-Sheet, Multi-Table Vlookup possible?
    By cte in forum Excel General
    Replies: 6
    Last Post: 09-11-2010, 11:18 AM
  7. Excel 2003 - updating multi worksheets..
    By dustyv in forum Excel General
    Replies: 2
    Last Post: 03-14-2008, 05:57 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