Saves changes to the workbook in a different file.
expression.SaveAs(
class=bterm>FileName, FileFormat,
class=bterm>Password, WriteResPassword,
class=bterm>ReadOnlyRecommended,
class=bterm>CreateBackup, AccessMode,
class=bterm>ConflictResolution, AddToMru,
TextCodepage,
class=bterm>TextVisualLayout,
class=bterm>Local)
expression Required. An expression that
returns one of the above objects.
Filename
Optional Variant. A string that indicates the name of the
file to be saved. You can include a full path; if you don't, Microsoft Excel
saves the file in the current folder.
FileFormat
Optional Variant. The file format to use when you save the
file. For a list of valid choices, see the
href="mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\vbaxl10.chm::/html/xlproFil...
property. For an existing file, the default format is the last file format
specified; for a new file, the default is the format of the version of Excel
being used.
Password
Optional Variant. A case-sensitive string (no more than 15
characters) that indicates the protection password to be given to the
file.
WriteResPassword
Optional Variant. A string that indicates the
write-reservation password for this file. If a file is saved with the password
and the password isn't supplied when the file is opened, the file is opened as
read-only.
class=runinhead>ReadOnlyRecommended Optional
class=bterm>Variant. True to display a message when the
file is opened, recommending that the file be opened as read-only.
CreateBackup
Optional Variant. True to create a backup
file.
class=runinhead>AccessMode Optional
class=DropDown onkeypress=Outline2() onclick=Outline2()
href="mk:@MSITStore:C:\Program%20Files\Mic...
size=1>.
XlSaveAsAccessMode can be one of these XlSaveAsAccessMode
constants. |
xlExclusive (exclusive
mode) |
xlNoChange default (don't
change the access mode) |
xlShared (share list)
If this argument is omitted, the access mode isn't
changed. This argument is ignored if you save a shared list without
changing the file name. To change the access mode, use the
id=HV05201100
href="mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\...
size=1> method. |
class=runinhead>ConflictResolution Optional
href="mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\vbaxl10.chm::/html/xlmthSav...
size=1>.
XlSaveConflictResolution can be one of these
XlSaveConflictResolution constants. |
xlUserResolution (display the
conflict-resolution dialog box) |
xlLocalSessionChanges (automatically
accept the local user's changes) |
xlOtherSessionChanges (accept other
changes instead of the local user's changes)
If this argument is omitted, the conflict-resolution
dialog box is displayed. |
AddToMru
Optional Variant. True to add this
workbook to the list of recently used files. The default value is
class=bterm>False.
TextCodePage
Optional Variant. Not used in U.S. English Microsoft
Excel.
TextVisualLayout
Optional Variant. Not used in U.S. English Microsoft
Excel.
Local Optional
class=bterm>Variant. True saves files against the
language of Microsoft Excel (including control panel settings).
class=bterm>False (default) saves files against the language of
class=glossary onkeypress="AppendPopup(this,'ofVBA')"
onclick="AppendPopup(this,'ofVBA')"
href="m...
(which is
typically US English unless the VBA project where Workbooks.Open is run from is
an old internationalized XL5/95 VBA project).
Hopefully this helps.
--
Phil Custer II, P.E.
Custer Services,
Inc.
href="mailto:custer@landfillgas.com">custer@landfillgas.com