Excel: Running FLATFILE.XLA from a User-Defined MacroLast reviewed: September 2, 1997Article ID: Q78308 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, the FLATFILE.XLA add-in file supplies a macro that allows you to import data from a text file to a worksheet, and a second macro that allows you to export data from a worksheet to a text file. Normally these features are accessed from menu options that the add-in supplies. To run the data export macro from within a user-defined macro sheet, you must make a slight modification.
MORE INFORMATIONTo execute the Data Export command from a user-defined macro, the following formula is used:
=FLATFILE.XLA!MCP01.FixedFieldExport()To execute the Data Smart Parse command from a user-defined macro, the following formula is used:
=FLATFILE.XLA!MCP05.SmartParse()If you attempt to export data from a spreadsheet to a file by calling the FLATFILE.XLA data export macro from within a user-defined macro, the user-defined macro will halt. This is because the FLATFILE.XLA data export macro ends with a HALT statement rather than a RETURN statement. The HALT command prevents the data export macro from returning control to the macro that called it.
WORKAROUNDThe HALT statement is contained on a cell of FLATFILE.XLA. You can replace it with a RETURN statement. Do the following:
REFERENCES"Microsoft Excel Function Reference," version 4.0, pages 216, 363 "Microsoft Excel Function Reference," version 3.0, pages 120, 200 "Microsoft Excel User's Guide 2," version 4.0, pages 151, 152, 199 "Microsoft Excel User's Guide," version 3.0, page 683-684
|
Additional query words: 3.0 3.00 4.0 4.00 4.0a 4.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |