ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Recordset Opening Excel File (https://www.excelbanter.com/excel-programming/273289-recordset-opening-excel-file.html)

Seth[_3_]

Recordset Opening Excel File
 
When I execute the following statement to query an Excel
workbook, it tells me that the file is read-only, as if
the Open method of the ADODB.RecordSet object is trying
to open the Excel worksheet. However, it is a SQL query
and I thought it would work whether or not the actual
workbook was open...

RS.Open SQL, ConnString, adOpenForwardOnly,
adLockReadOnly, adCmdText

The problem is that at my station, the file can be open
or closed and this statement works! (note: I am using an
add-in file to access a workbook stored on a network
drive). However, when a user has it open I get the "Read
Only" message.

Any thoughts?

Thanks,

Seth



All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com