Working With Other Workbooks And Files

Exira

The Workbook object has several properties to view and modify the properties of a particular workbook. The following properties are available for a Workbook object.

PROPERTY

DESCRIPTION

ActiveSheet

Read-only string indicating the name of the active sheet in the workbook.

FileFormat

Read-only value indicating the format of the workbook. Returns an

XlFileFormat constant, see Appendix A.

FullName

Read-only string indicating the name and complete path of the workbook.

HasPassword

Read-only Boolean value indicating whether the workbook is password protected.

Name

Read-only string indicating the name of the workbook.

Password

Returns or sets the password string for the open workbook.

Path

Read-only value that returns the complete Excel application path.

ProtectStructure

Read-only Boolean value indicating whether the order of the sheets in the workbook are protected. If value is True, you cannot move, delete, or add workbooks.

ReadOnly

Read-only Boolean value indicating whether workbook was opened read-only.

ReadOnlyRecommended

Read-only Boolean value indicating whether the workbook was saved as read-only.

Saved

Contains a Boolean value to indicate whether changes have been made since workbook was modified.

Title

Indicates the title that displays in the Excel title bar for the worksheet.

-Q Type NewWB.Title = "2001 Budget", replacing 2001 Budget with the text for the workbook title bar.

S Type NewWB.SaveAs "NewFilename.xls", replacing NewFilename.xls with the new name for the workbook.

Excel creates a new workbook using the specified template file and saves the workbook with the specified name.

-Q Type NewWB.Title = "2001 Budget", replacing 2001 Budget with the text for the workbook title bar.

S Type NewWB.SaveAs "NewFilename.xls", replacing NewFilename.xls with the new name for the workbook.

■ Excel creates a new workbook using the specified template file and saves the workbook with the specified name.

0 0

Post a comment