If these Y ranges are being created in code as well, if you store the start/end rows/cols into variables as you create them, you can then use those to size range X.
Range(cells(xStartRow,xStartCol),cells(xStartRow + yRowCount,xStartCol + yColCount).value = Y.value
Copy and paste might just be...
I believe that option determines when you will get a return from the .open method - before or after the connection has completed. I gave it a go though, but the end result is the same.
Thanks anyway
Is there a way to create an ADO connection to an excel spreadsheet but not lock the file for editing?
By setting the .Mode property of the ADODB.Connection object to 'adReadMode' I can allow multiple users to connect to a file in read-only, however the first user to connect will also still lock...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.