Text Import Wizard Is Displayed Using OPEN?() with Text File

Last reviewed: September 12, 1996
Article ID: Q118656
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Excel, when you use the OPEN?() macro function to display the Open dialog box, the Text Import Wizard dialog box appears when you open a text file.

CAUSE

The Text Import Wizard appears when you open a text file to allow you to choose how you want the text file to be displayed. However, this dialog box appears even when you use a macro to display the Open dialog box.

This behavior may interfere with the functionality of your macro if your macro is designed to open and format a text file. This behavior occurs even if you set the Editable argument to TRUE, which is documented as being the same as holding down the SHIFT key while you choose the OK button in the Open dialog box.

Note that the Text Import Wizard does not appear when you open a file using the OPEN() macro function.

WORKAROUNDS

To avoid having the Text Import Wizard appear when you open a text file using a macro, do any of the following:

  • If you know the name of the file that you want to open, use the OPEN macro function with the name of the file to open the text file.

    -or-

  • If you want to display the Open dialog box to choose which file to open, use the OPEN.DIALOG() macro function to return the name of the file to open, and then use the OPEN() function to open the file as in the following example:

    Microsoft provides macro examples for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This macro is provided as is and Microsoft in no way guaranties that the following code can be used in all situations and will not support modifications of the code to suit specific customer requirements.

    A1: file=OPEN.DIALOG() A2: =OPEN(file) A3: =RETURN()

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.

MORE INFORMATION

In Microsoft Excel version 5.0c, you can set value of the Editable argument to true in the OPEN?() function to avoid having the Text Import Wizard appear when you open a text file. The following is an example of using this method:

   =OPEN?(,,,,,,,,,,TRUE)

REFERENCES

For more information about OPEN(), choose the Search button in Microsoft Excel Macro Functions Help and type:

   OPEN function


KBCategory: kbprb
KBSubcategory:

Additional reference words: 5.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.