query to external data

T

Tony7659

Whenever I open a file getting data from an external source I get a window as
follows:
Title:
Query Refresh
Message:
Path\....
This workbook contains queries to external data that refresh automatically
Enable automatic refresh / Disable automatic refresh
How can I avoid this message and default it to Enable automatic refresh?
Thank you. Tony.
 
A

AFSSkier

Tony,

Click the Microsoft Office Button (upper left), and then click Excel Options.
Click Trust Center, and then click Trust Center Settings.
Click a dot on "Never show info about block content".
 
T

Tony7659

Kevin,
Is there a way to do it through code for a single sheet? I have other files
where I would like to have this option open to my choice. Thank you.
Tony.
 
A

AFSSkier

Tony,

Unfortuniately I'm a newbie when it comes to vba code. However as I was
searching for something else for myself, I found some code that may help you.

From the VB coding post & to quote Don Guillett "try something like"

for each q in thisworkbook.querytables
q.refresh
next q

--
Hope this helps you. If not, don't stop searching. I've learned more from
this site & it's links. More than anywhere else. The MVPs are very helpful
here! I'm an Excel & Access power user & try to help out where I can.

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top