"Invalid Data Format" Referencing File that Contains ProcedureLast reviewed: July 29, 1997Article ID: Q114226 |
The information in this article applies to:
SYMPTOMSIn a Visual Basic module, when you use the Browse dialog box to reference a file created in another application that contains a Visual Basic procedure, you receive the following error message:
Invalid data format CAUSEThis is by design. You cannot, for example, reference a Microsoft Excel workbook file that contains a Visual Basic module, from a Visual Basic module in a Microsoft Project project file.
WORKAROUNDTo run a procedure from a Visual Basic module in one application (App1) that is contained in a file created by another application (App2), you can use the methods and properties of the object library exposed by the application that was used to create the Visual Basic procedure (App2). For example, to run a macro from a Visual Basic module in Microsoft Excel that is contained in a Microsoft Project project file, do the following:
MORE INFORMATIONIn a Visual Basic module in Microsoft Excel, you can use the Browse dialog box to reference another workbook file (*.XLS) or an add-in file, (*.XLA) that contains a Visual Basic procedure. In a Visual Basic module in Microsoft Project, you can use the Browse dialog box to reference another project file (*.MPP) that contains a Visual Basic procedure. You can reference a toolbar file, (*.TLB) or an object library file (*.OLB) from a Visual Basic module in either Microsoft Excel or Microsoft Project. Keywords : kbcode kberrmsg kbprg Version : 1.00 Platform : WINDOWS |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |