ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can you query status of data connections? (https://www.excelbanter.com/excel-programming/421244-can-you-query-status-data-connections.html)

Invicta

Can you query status of data connections?
 
Hi

Is it possible to determine if data connections are disabled or not in Excel
2007 VBA?

E.g. if I run this VBA

ActiveWorkbook.Worksheets("sheet1").Range("B2").Qu eryTable.Refresh
BackgroundQuery:=False

Err.number is always 0 even if data connections are disabled. I would like
to check and prompt a warning message if the data connectios are disabled.

Many thanks


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com