ok,
file is on client pc and its trying to get data from mqsql server on other computer.

Sometimes that server goes down for maintenance.

File on client pc auto refresh data every 2 mins.
so during auto refresh if server is down and then excel cannot auto refresh the data, so it gives error and macro stop working.

i have to press debug button every time when it cannot connect to database to refresh the data. which i want to avoid.

thanx