Equivalent to clicking the Save As command on the File menu. Use SAVE.AS to specify a new filename, file type, protection password, or write-reservation password, or to create a backup file.
Syntax
SAVE.AS(document_text, type_num, prot_pwd, backup, write_res_pwd, read_only_rec)
SAVE.AS?(document_text, type_num, prot_pwd, backup, write_res_pwd, read_only_rec)
Document_text specifies the name of a workbook to save, such as SALES.XLS (in Microsoft Excel for Windows) or SALES (in Microsoft Excel for the Macintosh). You can include a full path in document_text, such as C:\EXCEL\ANALYZE.XLS (in Microsoft Excel for Windows) or HARDDISK:FINANCIALS:ANALYZE (in Microsoft Excel for the Macintosh).
Type_num is a number specifying the file format in which to save the workbook.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following table shows which values of type_num apply to the six Microsoft Excel document types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prot_pwd corresponds to the Protection Password box in the Save Options dialog box in Microsoft Excel 95 or earlier versions, or the Password To Open box in Microsoft Excel 97 or later.
Prot_pwd is a password given as text or as a reference to a cell containing text. Prot_pwd should be no more than 15 characters.
If a file is saved with a password, the password must be supplied for the file to be opened.
Backup is a logical value corresponding to the Always Create Backup check box in the Save Options dialog box and specifies whether to make a backup workbook. If backup is TRUE, Microsoft Excel creates a backup file; if FALSE, no backup file is created; if omitted, the status is unchanged.
Write_res_pwd corresponds to the Write Reservation Password box in the Save Options dialog box in Microsoft Excel 95 or earlier versions, or the Password To Modify box in Microsoft Excel 97 or later. Allows the user to write to a file. If a file is saved with a password and the password is not supplied when the file is opened, the file is opened read-only.
Read_only_rec is a logical value corresponding to the Read-Only Recommended check box in the Save Options dialog box.
If read_only_rec is TRUE, Microsoft Excel saves the workbook as a read-only recommended workbook; if FALSE, Microsoft Excel saves the workbook normally; if omitted, Microsoft Excel uses the current settings.
When you open a workbook that was saved as read-only recommended, Microsoft Excel displays a message recommending that you open the workbook as read-only.
Related Functions
CLOSE Closes the active window
GET.DOCUMENT Returns information about a workbook
SAVE Saves the active workbook
SAVE.WORKBOOK Saves a workbook
Return to index