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.
Bookmarks