+ Reply to Thread
Results 1 to 2 of 2

workbook.refreshall leaving links open

  1. #1
    Registered User
    Join Date
    04-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    1

    Question workbook.refreshall leaving links open

    I don't code a lot of VB and I have a business user that has written a program/macro in VB. She has external links and all is well until/unless she does a refreshall. When she does that, the section of her code that goes to open a file tells her that the file is already open.

    The file she is trying to open is also one of the linked data files. Does Excel keep the files open after the refreshall? Is there any way to force that they close like using the workbook.dispose function?

    I'm also wondering if since it is already open, if she can just access it. so she could change her code to something like

    on error continue
    (or that other one that turns off warnings)
    try to open the file
    turn off the error checking

    continue with the remaining code.

    That way if it is already open, it will not throw and error and it will just continue processing if it find that the workbook is already open.

    right now the only way it works is that she has to save/close/reopen the workbook every time she does the refreshall.

  2. #2
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: workbook.refreshall leaving links open

    Important question... have the same problem.

    Need the DB available, and once 1 access it ... i'm blocked until that file is closed..

    Any solution to disable data connections?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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