Thank you! I really appreciate your help! The problem is, that there is actually no big code running. The same problem occurs when I create pivottable from external source manually (not by code). I can refresh pivottable. A workmate of mine from another department cant refresh this table! Even though he can enter the database and do whatever he wants.

I have no idea what is the problem. And our IT department as well :/

The problem - error ODBC failure - err.number 1004

Thank you a lot