The information in this article applies to:
SUMMARYAlthough Microsoft Excel version 5.0 does not include the File Functions (Filefns.xla) add-in macro (or the associated Filefns.dll file), if you install Microsoft Excel version 5.0 without deleting the earlier version of Microsoft Excel (3.0 or 4.0), the Filefns.xla add-in macro will still be available and will function normally (because the file is not deleted when you install version 5.0). However, if you do a "clean" installation of Microsoft Excel 5.0 (that is, if you delete the earlier version of Microsoft Excel before you install version 5.0), and you then run a macro that uses any of the Filefns.xla add-in functions, you will receive a macro error. Most of the file maintenance tasks that you can do with the File Functions add-in functions can be done with Visual Basic procedures.
MORE INFORMATIONThe following table lists the functions that are available in the File Functions add-in macro and their Visual Basic equivalents.
File Functions Macro Command Equivalent Visual Basic Statement ------------------------------------------------------------------------ =CREATE.DIRECTORY() MkDir "MYDIR" =DELETE.DIRECTORY() RmDir "MYDIR" =DIRECTORIES() MyDir = Dir(pathname,16) ' Call repeatedly until Dir returns a zero- ' length string. =OPEN.DIALOG() MyDialog = Application.GetOpenFilename(fileFilter, _ FilterIndex,Title,buttonText) ' This second form will bring up the Microsoft ' Excel internal Open dialog box. MyDialog2=Application.Dialogs(xlDialogOpen).Show ' Will bring up default Open dialog box. =SAVE.DIALOG() MyDialog=Application.GetSaveAsFilename _ (initialFilename,fileFilter,filterIndex,title, _ buttonTitle) ' This second form will bring up the Microsoft ' Excel internal Save As dialog box. MyDialog2=Application.Dialogs(xlDialogSaveAs).Show ' Will bring up default Save As dialog box. =FILE.EXISTS() MyFile = Dir(pathname)
REFERENCESFor more information about GetOpenFilename, choose the Search button in Help and type:
For more information about "Visual Basic Equivalents for Macro Functions and Commands," choose the Search button in Help and type:
Additional query words: 5.00c 5.00a Keywords : kbprg PgmOthr |
Last Reviewed: November 9, 1999 |