XL5: Invalid Filename Entered in Linked List Closes Dialog

Last reviewed: March 27, 1997
Article ID: Q112174
5.00 5.00c 7.00 WINDOWS kbusage

The information in this article applies to:

  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows 95, version 7.0

SYMPTOMS

In Microsoft Excel versions 5.x or 7.0, if you enter an invalid filename in the edit box of a linked file/drive and directory list box in a custom dialog box that you created in Microsoft Excel version 4.0, the dialog box is closed when you choose OK. This problem also occurs with any filename that contains characters such as the backslash (\) and asterisk (*) that you normally use to change directories or display files with different filename extensions.

WORKAROUND

In order to use a linked file/directory box in a custom dialog box that changes directories or displayed files when you type certain characters (such as the backslash or asterisk), test the value entered in the edit box for the specified character, and display the dialog box again with the desired value. For example, the following macro searches for an asterisk in the entered value. If the asterisk is found (the SEARCH() function does not return an error) the custom dialog box is displayed again and the entered value is displayed in the edit box:

   A1: Linked_List
   A2: finished=FALSE
   A3: =WHILE(finished=FALSE)
   A4: dialog_box=DIALOG.BOX(box)
   A5: =IF(dialog_box=FALSE,RETURN())
   A6: finished=ISERR(SEARCH("~*",$G$2))
   A7: =NEXT()
   A8: =RETURN()

In the above macro, $G$2 is the cell on the macro sheet that contains the value you enter in the edit box above the linked file/directory box. You can use a similar macro to check for the backslash character, change directories, and display the dialog box again.

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.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 5.00 5.00c 7.00
Keywords : kbusage
Version : 5.00 5.00c 7.00
Platform : WINDOWS


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: March 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.