PRB: Opening Excel 4.0 Worksheets with DAOLast reviewed: August 6, 1997Article ID: Q172404 |
The information in this article applies to:
SYMPTOMSOpening an entire Excel 4.0 Worksheet, according to the syntax described in Books Online and according to the syntax used in all previous versions of Visual Basic, will cause Run-time error '3011'.
RESOLUTIONFor a workaround, modify the Source argument for the OpenRecordset method from FILENAME#XLS to FILENAME$. Please see below for an illustration.
Set db = OpenDatabase("c:\file.xls", False, False, "Excel 4.0;HDR=NO;") Set rs = db.OpenRecordset("file$") STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe syntax specified in Books Online for working with Excel Worksheets and Workbooks is consistent with the documentation for all previous versions of Visual Basic. Other than opening entire Excel 4.0 Worksheets, no other problems are known to exist at this time. In fact, opening a named range in an Excel 4.0 Worksheet will work just as described.
Keywords : VBKBDAO VBKBDB VBKBJet VBKBObj VBKBDAODatabase VBKBRecordset VBKBBooksOnline Component : dao Version : WINDOWS:5.0 |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |