Directories Function Returns an Error in ExcelLast reviewed: November 30, 1994Article ID: Q71255 |
The information in this article applies to:
SYMPTOMSThe "Microsoft Excel User's Guide," version 3.0, incorrectly states that the add-in FILEFNS.XLA DIRECTORIES macro will return a list of the subdirectories in the current directory when the argument is omitted. The "User's Guide" shows the following macro formula:
=DIRECTORIES()If you enter the function this way, the #VALUE! error is returned.
WORKAROUNDSTo return a list of the subdirectories in the current directory, use the DIRECTORY function to provide the current directory name for the DIRECTORIES function as in the following example:
=DIRECTORIES(DIRECTORY())You can also use the DIRECTORIES function with any directory as a string argument, or with an empty string such as the following
=DIRECTORIES("")This example correctly returns an array of all subdirectories in the root directory of the current drive.
STATUSThis problem has been corrected in Microsoft Excel version 4.0.
MORE INFORMATIONIn Microsoft Excel version 4.0, you can use the DIRECTORIES function without the quotation marks to return the subdirectories in the current directory. However, the Microsoft Excel version 4.0 "Function Reference" shows an incorrect example using quotation marks, and states that this method will return a list of the subdirectories in the current directory. Instead, when you use the function as in the following example
=DIRECTORIES("")a list of the subdirectories in the root directory of the current drive is returned. Note that the File Functions add-in is not included in Microsoft Excel version 5.0. However, if you install Microsoft Excel version 5.0 to the directory that contains Microsoft Excel version 3.0 or 4.0, you can open or load the file FILEFNS.XLA and use the functions contained in the add-in. \*
REFERENCES"Function Reference," version 4.0, page 114 "Microsoft Excel User's Guide," version 3.0, Appendix B, page 680
|
KBCategory: kbother kbdocerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |