Stop query refresh if source file is in use

AllanSull

Board Regular
Joined
Oct 21, 2013
Messages
105
I have a vba interface displaying some values from a sheet, this sheet is a database query to another workbook, the query is refreshed every minute using the ontime event to give a "live" feel to the vba userform. When the source workbook is open in write mode (requires a password) and this refresh is made, the notification window pops up over the vba userform saying the source workbook is locked for editting. This breaks the vba into debug mode. Is there any way to stop this notification pop up, perhaps forcing a read only query or skipping the query until the next ontime event is triggered?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,215,793
Messages
6,126,934
Members
449,349
Latest member
Omer Lutfu Neziroglu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top