PRB: GeoFacts Sample Causes Automation Error on NTLast reviewed: December 16, 1997Article ID: Q178167 |
The information in this article applies to:
SYMPTOMSThe GeoFacts.vbp sample project fails with the following run-time error when run on a Windows NT machine:
Run-time error '-2147467259 (80004005)': Automation errorThis error does not occur on a Windows 95 machine.
CAUSEThe run-time error occurs on the following line of code:
Set shtWorld = GetObject("world.xls")The GetObject function fails because the full path to world.xls is not specified in the argument.
RESOLUTIONWhen using the GetObject function, make sure that the full path to the file name is specified. To correct the code in the GeoFacts.vbp sample, change the following line of code (located in the Setup procedure in Module1):
Set shtWorld = GetObject("world.xls")to:
Set shtWorld = GetObject(app.path & "\world.xls") STATUSThis behavior is by design.
REFERENCESFor additional information, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q143461 TITLE : XL97: CreateObject and GetObject Work Differently ARTICLE-ID: Q178166 TITLE : PRB: GeoFacts Sample Causes Type Mismatch Error with Excel 97 |
Additional query words: 'world.xls' could not be found
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |