Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vb and excel as datasource
here is my code below everything goes well until
Set rst = oConn.Execute(strSQL) it says it cant find the object 29-Dec-2003 (this is the worksheet name for sure) I have tried this with the sheet named ws1 and without the a2:5000 any ideas whats going on? Private Sub Form_Load() Dim rst As ADODB.Recordset Dim oConn As ADODB.Connection Set oConn = CreateObject("ADODB.Connection") MsgBox App.Path & "\caretaker.xls" strSQL = "SELECT * FROM [29-Dec-2003$a2:G500]" oConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & App.Path & "\caretaker.xls;DefaultDir=" & App.Path Set rst = oConn.Execute(strSQL) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table from External Datasource of Excel Workbook | New Users to Excel | |||
How do I change the datasource location for a query in Excel 2003 | Excel Discussion (Misc queries) | |||
Security for Viewing MS Access Databases From Excel Datasource | Excel Discussion (Misc queries) | |||
Web form validation using Excel datasource? | Excel Programming | |||
Excel column as datasource | Excel Programming |