1、vba for excel worksheet 对象(VBA 在 Excel工作表对象)Worksheet object stands for a worksheet.MethodActivatemakes the current worksheet an active worksheet. Calculatecalculates the cells in the specified worksheet or worksheet specified area in all open workbooks, workbooks, and tables as shown in the table b
2、elow.ChartObjectsreturns an object that represents an embedded chart (ChartObject object) on a worksheet or a collection of all embedded diagrams (ChartObjects objects).Spelling of objects checked by CheckSpelling.CircleInvalidloops the invalid data items in the worksheet.ClearArrowsclears the trace
3、 arrows for the specified worksheet. Use the audit function to add tracking arrows.ClearCirclesclears the loop of the invalid data item of the specified worksheet.Copycopies the worksheet to another location of the workbook.Deletedelete object.Evaluateconverts a Microsoft Excel name to an object or
4、a value.ExportAsFixedFormatexports files in specified format.Movemoves the worksheet to other locations in the workbook.OLEObjectsreturns an object that represents a single OLE object (OLEObject) on a graph or worksheet, or a collection of all OLE objects (OLEObjects set). Read-only.Pastepaste the c
5、lipboard content to the worksheet.PasteSpecialpaste the contents of the clipboard into the worksheet in a specified format. This method can be used to paste data from other applications or to paste data in a particular format.PivotTablesreturns an object that represents a single PivotTable (PivotTab
6、le object) on a worksheet or a collection of all PivotTable reports (PivotTables objects). Read-only.PivotTableWizardcreates a new pivottable. This method does not display the PivotTable wizard, and it does not apply to the OLE DB data source. Please use the Add method to add PivotTable cache, and t
7、hen create PivotTable reports based on the cache.PrintOutprint object.PrintPreviewdisplays the object preview after the object is printed.Protectprotects the worksheet from being modified.ResetAllPageBreaksre setting specifies all the page breaks on a sheet.SaveAssaves changes in charts or worksheet
8、s to another different file.Scenariosreturns an object that represents a single scheme (Scenario object) or a collection of programs (Scenarios objects) in a workbook.Selectselection object.SetBackgroundPicturesets the background graph for the worksheet.ShowAllDatamakes all rows of the current filte
9、r list visible. If you are using auto filter, this method changes the drop-down list box to “(all)“.ShowDataFormdisplays data forms associated with the specified worksheet.Unprotectcancels the protection of worksheets or workbooks. If the worksheet or workbook is not protected, this method does not
10、work.XmlDataQueryreturns a Range object that represents mapping to a specific XPath. If the specified XPath path has not been mapped to the worksheet, or the mapped region is empty, then Nothing is returned.XmlMapQueryreturns a Range object that represents mapping to a specific XPath. If the specifi
11、ed XPath path has not yet been mapped to the worksheet, the Nothing is returned.attributeApplicationif the object identifier is not used, then the property returns a Application object that represents the Microsoft Excel application. If an object identifier is used, the property returns a Applicatio
12、n object that represents the creator of the specified object (which can be used by an OLE automation object to return the object using this property). Read-only.MailEnveloperepresents the e-mail title of a document.Namereturns or sets a String value that represents the name of the object.Namesreturn
13、s a collection of Names, which represents all tables specific to the worksheet (using the name defined by the prefix “WorksheetName“). The Names object is read-only.Nextreturns the Worksheet object that represents the next worksheet.Outlinereturns a Outline object that represents the hierarchical di
14、splay of the specified worksheet. Read-only.PageSetupreturns a PageSetup object that contains all the page settings for the specified object. Read-only.Parentreturns the parent object of the specified object. Read-only.Previousreturns the Worksheet object that represents the next worksheet.ProtectCo
15、ntentsif the worksheet content is protected, then True. This property protects individual cells. To open content protection, use the Protect method and set the Contents parameter to True. Boolean type, read-only.ProtectDrawingObjectsif the shape is protected, then True. To open shape protection, use
16、 the Protect method and set the DrawingObjects parameter to True. Boolean type, read-only.Protectionreturns a Protection object that represents the protection options for the worksheet.ProtectionModeif the user interface specific protection is enabled, then True. To open user interface protection, u
17、se the Protect method and set the UserInterfaceOnly parameter to True. Boolean type, read-only.ProtectScenariosif the worksheet scheme is in a protected state, the attribute value is True. Boolean type, read-only.QueryTablesreturns the QueryTables set, which represents all the query tables on the sp
18、ecified worksheet. Read-only.Rangereturns a Range object that represents a cell or cell region.Rowsreturns a Range object that represents all rows in the specified worksheet. The Range object is read-only.ScrollAreareturns or sets the allowed scrolling region in the form of a A1 style region referen
19、ce. The user cannot select cells outside the rolling area. String type, readable.Shapesreturns a collection of Shapes, representing all the shapes on the worksheet. Read-only.SmartTagsreturns a SmartTags object that represents the identifier of the specified cell.Sortreturns a sorted value in the cu
20、rrent worksheet. Read-only.StandardHeightreturns the standard height (default) of all rows in the worksheet in pound. Double type, read-only.StandardWidthreturns or sets the standard width for all columns in a worksheet (default). Double type, readable.Tabreturns the Tab object of a worksheet.Transi
21、tionExpEvalif the Microsoft Excel evaluates the worksheet by using Lotus 1-2-3 expressions, then the value of the attribute is True. Boolean type, readable.TransitionFormEntryif the Microsoft Excel uses the formula input rule of Lotus 1-2-3 to the worksheet, the value of this property is True. Boole
22、an type, readable.Typereturns a XlSheetType value that represents the worksheet type.UsedRangereturns a Range object that represents the area used on the specified worksheet. Read-only.Visiblereturns or sets a XlSheetVisibility value that determines whether the object is visible.VPageBreaksreturns a
23、 collection of VPageBreaks, which represents the vertical page on the worksheet. Read-only.EventThis event occurs when Activateactivates workbook, worksheet, chart worksheet, or embedded chart.BeforeDoubleClickoccurs when the worksheet is double clicked. This event precedes the default double-click
24、operation.This event occurs when the BeforeRightClickright-click the worksheet. This event precedes the default right-click operation.Calculatefor Worksheet objects, after the recalculation of the worksheet, this event occurs.Changeoccurs when the user changes the cell in the worksheet or the extern
25、al link causes a change in the cell.This event occurs when the Deactivatechart, worksheet, or workbook is deactivated.FollowHyperlinkoccurs when you click any hyperlink on the worksheet. For events at application level or workbook level, see the SheetFollowHyperlink event.This event occurred after updating PivotTable in the PivotTableUpdateworkbook.SelectionChangethis event occurs when the selected area on the worksheet changes.