Using the DIR() Function Does Not Produce Error

Last reviewed: March 27, 1997
Article ID: Q133052
5.00 7.00 7.00a WINDOWS kbusage

The information in this article applies to:

  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a

SYMPTOMS

In the versions of Microsoft Excel listed above, when you use the Dir() function in a Visual Basic for Applications module, if the directory does not exist or is incorrect, you do not receive a run-time error.

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.

MORE INFORMATION

The Dir() Function returns the name of a file, directory, or folder that matches a specified pattern or file attribute, or the volume label of a drive.

REFERENCES

"Microsoft Excel Visual Basic for Applications Reference" version 5, page 198

For more information about the Dir function, choose the Search button in Programming With Visual Basic Help, and type:

   dir


KBCategory: kbusage
KBSubcategory: xlnt

Additional reference words: 5.00 1004 files 7.00
Keywords : xlnt kbusage
Version : 5.00 7.00 7.00a
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.