The information in this article applies to:
SYMPTOMSWhen you use the SAVE.AS function in a Microsoft Excel 4.0 macro, you may receive the following error message: where <file name> is the name of the file you are saving. In Microsoft Excel version 5.0, if you attempt to save a workbook using the SaveAs method in a Microsoft Visual Basic for Applications macro, you may receive the following error message: The file name may appear correctly in the file's title bar on the screen. However, the directory to which the file is saved will actually contain a file name with random numbers and characters, such as 860FB600. If you make additional attempts to save files by using the Save or SaveAs methods during the current session of Microsoft Excel, you may receive the error message stated above. CAUSEIn both cases, the behavior occurs if the file name you provide in the SAVE.AS function or the SaveAs method is longer than 31 characters. The Apple Macintosh operating system limits a file name to 31 characters. WORKAROUNDTo work around this behavior, use a shorter file name when you save your document with the SAVE.AS function or SaveAs method. If you experience this behavior with the SaveAs method, quit and restart Microsoft Excel in order to programmatically save any more files with the Save or SaveAs methods. If you need to save a file before quitting Microsoft Excel, use the Save or SaveAs commands on the File menu. MORE INFORMATION
Both the SAVE.AS function and the SaveAs method have arguments to specify a
name for the file you are saving. These arguments are document_text and
filename, respectively. These macro functions are used to save a worksheet
or workbook with a new file name, file type, protection password, or to
create a backup file.
REFERENCES
"Microsoft Excel Function Reference," version 4.0, page 369
SAVE.ASFor more information about the SaveAs method, click the Search button in the Microsoft Excel Visual Basic Help file and type: SaveAs Method Additional query words: 3.00 4.00 5.00a 32
Keywords : kberrmsg kbprg PgmOthr xlmac |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |