Macro to open files isn't updating correctly

  • Thread starter Thread starter telewats
  • Start date Start date
T

telewats

I've created a macro that opens five Excel files. The fifth file link
to the other four for information. I have this one set to open las
because the first four files must be opened in order for Excel to rea
them, as they are created through another program so the formattin
isn't such that it can be read by Excel until they are active.

When opening the fifth file without the macro, an option to enabl
macros in the file comes up, in which Yes is the correct prompt, an
then an option to enable autolinks to other workbooks comes up, i
which, again, Yes is the correct prompt. Upon answering thes
questions, appropriate data in this file is updated with the info fro
the others. However, when using the macro, it isn't linking the othe
files as needed. Is there something that must be done to make thi
happen? I created the macro using the "Record Macro" option, so i
should be capturing everything I did, but I'm wondering if it doesn'
capture the answers to the opening prompts for some reason
 
Not sure if this will do it for you, but here's something to try while
the gurus get to this post.

Edit the macro and paste in this line of code just after the Sub
YourMacroName() line:
Application.DisplayAlerts = False

This will disable the prompt windows. Then at the end of the code,
just before the line that says End Sub, enter this line:
Calculate

This causes the workbook to recalculate, and if all the proper books
are open, the links should update. Let us know what results you get.
 
Thanks for the tip. Even with these changes, I still can't get this to
work, though. If I close just the main file, and reopen, it calculates
perfectly, however it won't do it when using the macro which auto-opens
it. ??
 
Back
Top