ADO connection to already open excel workbook?

tinkythomas

Active Member
Joined
Dec 13, 2006
Messages
432
Hi,

I have sucessfully managed to open and extract data using ADO on closed excel workbooks located on a server. However if the workbooks are already open on another user's pc then they actually physically open on my pc (read-only).

I'm also experiencing memory leaks as I receive errors relating to resources. The code is running from Excel 2007 and I'm copying data from several workbooks (.xlam workbooks) into MS Access. I decided to use ADO because using Automation was far to slow!

I don't believe there are problems with the code I'm using because as mentioned it works fine on closed workbooks.

I can however post the code if needed.

Any help would be appreciated.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi,

I have managed to resolve this issue by following the steps in this Microsoft KB article I followed step 2.

I added a function to test for open workbooks and copied those that were from the server to local pc and opened a connection from there.

Hope this helps someone?

Regards,
 
Upvote 0
I'd be interested in what function you used to test for an open excel spreadsheet.
I've used
Open strFileName For Binary Access Read Write Lock Read Write As #1


in VBA to check.
TIA
</SPAN>
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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