PDA

View Full Version : Excel .xlsm + Run time error 1004 Initialization of the data source failed



Shaimaa T
08-28-2014, 01:43 AM
I am accessing a client .xlsm file from my machine and it works fine.

The client complains that he received a Run time error 1004 : Initialization of the data source failed.

So on trying on a different machine(connected to client's network) , I was able to reproduce this error.

I just don't understand how the very same file with the data source is connecting and working fine on my local machine whereas failing on the client network.

The .xlsm file on opening has data part(from access, from ..., existing connections) enabled then in a few seconds greyed out.

Any help please?

Bob Phillips
08-28-2014, 02:58 AM
Any code/workbook please?

Shaimaa T
08-28-2014, 04:26 AM
ThisWorkbook.Worksheets("DB Data").Range("A1").ListObject.QueryTable.Refresh BackgroundQuery:=False

this is where I land in when clicking debug after Runtime error.

Please note that it works on another machine connected to a client network. So what differences should I be looking for to be able to make it work on all machines ?