Page 162 - Microsoft Office Excel 2003 Programming Inside Out
P. 162
Part 3: The Excel Object Model
Microsoft Office Excel 2003 Programming Inside Out
Table 7-3. The ThisWorkbook.SaveAs Parameters
Parameter Description
FileName The name and path of the file to be saved.
FileFormat The Excel constant representing the file format in which to save
Chapter 7
the file. There are 44 Excel file format constants, which you can
look up in the Visual Basic Editor help system by typing
xlFileFormat in the Ask A Question box.
Password Sets a password for the file. The password must be 15
characters or fewer.
WriteResPassword Sets a password for restricting who may write changes to the file,
while still allowing the file to be opened as read-only.
ReadOnlyRecommended When set to True, displays a dialog box recommending the user
open the file in read-only mode.
CreateBackup When set to True, creates a backup copy of the workbook.
AccessMode Indicates whether the file is saved in exclusive mode
(xlExclusive), in no changes mode (xlNoChange), or as a shared
file (xlShared). In exclusive mode, only one user may have the
workbook open and make changes at a time. Saving a file with
no changes leaves the access mode unchanged, while saving a
file as a shared file lets more than one user have read/write
access to the file at a time.
ConflictResolution Indicates how Excel should handle conflicting changes in a
shared workbook by setting ConflictResolution to one of these
XlSaveConflictResolution constants: xlUserResolution, the default,
which displays the Conflict Resolution dialog box;
xlLocalSessionChanges, which causes Excel to automatically
accept the local user’s changes; or xlOtherSessionChanges,
which causes Excel to accept other changes instead of the local
user’s changes.
AddToMru When set to True, adds the file name to the list of most recently
used files on the File menu.
TextCodePage A variant, not used in the American English version of Excel, that
controls how the characters in a workbook are interpreted and
displayed.
TextVisualLayout A variant, not used in the American English version of Excel, that
controls how the workbook is displayed within the Excel
interface.
Local A Boolean variable that indicates whether to use the local
language set in Excel or the local language set in VBA (if
different).
136