+ Reply to Thread
Results 1 to 3 of 3

Need help with Data Connection refresh

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    WA, US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Need help with Data Connection refresh

    Excel 2013
    2 Excel files. A. master source file containing Job numbers. B. Employee timesheet files that refreshes the Job numbers data from master sources file when opening the file

    The data refresh correctly when I manually click on Refresh All, or use "ActiveWorkbook.RefreshAll" in Workbook_Open. However, this locks up the Master source file until I close out of the timesheet. This solution is not going to work since it only allows one employee to update timesheet at a time.

    Also tried the following code to refresh data, which works for other data connections already in the timesheet file (setup by predecessor), but for whatever reason, it doesn't work for the new job number connection.

    Please Login or Register  to view this content.
    Please advise if there is a way to end the connection after the data is refreshed so the source file is not locked. Or, what do I need to change on the data connection to enable the Sheet1.querytables to work.

    Please help. Thanks in advance.
    Last edited by jeffreybrown; 03-06-2017 at 08:44 PM. Reason: Code tags please!

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Need help with Data Connection refresh

    What is your 'master source file', an Excel workbook? how you adding the data connection?

  3. #3
    Registered User
    Join Date
    01-27-2011
    Location
    WA, US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with Data Connection refresh

    Not sure what happened, but my reply is not showing up.
    Anyhow, here are the steps on how I added the data connection
    1. Setup the job numbers in the Master source excel workbook and gave it a range name "Source1"
    2. From the timesheet file, Data - Connections - Add - Browse to the Master file, and select Source1
    3. Existing Connections, and select the new connection and select a sheet in timesheet and click OK to Import data.

    Everything populated correctly, and if I delete some of the data from timesheet and click refresh, it re-populates correctly.

+ 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. Replies: 2
    Last Post: 08-26-2015, 11:35 AM
  2. Data connection refresh on Certain Days
    By swiftrain in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-18-2014, 02:23 PM
  3. Replies: 2
    Last Post: 07-09-2014, 01:38 PM
  4. Formatting not updating upon data connection refresh
    By jmewebb in forum Excel General
    Replies: 1
    Last Post: 06-03-2014, 02:05 PM
  5. VBA Data Connection Refresh when File is in use
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2014, 01:42 PM
  6. Refresh Data Connection Compatibility 2007 vs 2003
    By cfherd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2012, 05:13 AM
  7. Refresh SQL data link by macro instead of excels connection wizard
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-23-2010, 11:11 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