首页 > 代码库 > 【Excel&VBA】VBA对象体系

【Excel&VBA】VBA对象体系

VBA对象体系

Application对象——代表整个Microsoft Excel应用程序
常用属性 常用方法常用事件
ActiveCell OnWindow Calculate SheetActive
ActiveSheet Path ConvertFormula SheetDeactive
ActiveWindow PathSeparator OnKey SheetFollowHyperlink 
ActiveWorkbook Range InputBox WindowActive
AskToUpdateLinks Rows  Run WindowDeactivate
Assistant ScreenUpdating  WorkbookActivate
AutoRecover Selection   WorkbookBeforeClose
Caption Sheets   WorkbookOpen
Cells ShowWindowsInTaskbar  
Charts StandardFont   
Columns StandardFontSize   
CommandBars StartupPath   
CommandUnderlines StatusBar   
Creator ThisCell   
Cursor ThisWorkbook   
DefaultFilePath UserControl   
DefaultSaveFormat Workbooks   
DisplayFormulabar Worksheets    
DisplayFullScreen DisplayScrollBars   
Name DisplayStatusBar   

 

Workbooks集合对象——当前打开的所有Workbook对象集合
 属性 方法
 Application Add
 Count Close
 Creator Open
 Item OpenDatabase
 Parent OpenText

 

Workbook对象——Microsoft Excel工作簿
属性方法事件
ChartsActiveActivate
CodeNameCloseBeforeClose 
FullNameProtectOpen 
FullNameURLEncodedProtectSharingSheetActivate 
HasPasswordRunAutoMacros SheetDeactivate 
InactiveListBorderVisibleSave SheetFollowHyperlink 
PasswordSaveAs WindowActivate
PathSaveCopyAs WindowDeactivate 
ProtectStructureUnprotect  
ProtectWindowsAdd  
ReadOnly  
Saved  
Sheets  
Windows  
Worksheets  
WritePassword  

 

Worksheets集合对象——指定的或活动工作簿中所有Worksheet对象的集合
属性方法
ApplicationAdd
CountCopy
HPageBreaksDelete
ItemFillAcrossSheets
ParentMove
VisiblePrintOut
VPageBreaksSelect

 

Worksheet对象——一张工作表
属性方法事件
ApplicationActivateActivate
AutoFilterCalculateBeforeDoubleClick
AutoFilterModeChartObjectsBeforeRightClick
CellsCheckSpellingCalculate
CircularReferenceCircleInvalidChange
CodeNameClearArrowsDeactivate
ColumnsCopyFollowHyperlink
EnableSelectionDeletePivotTableUpdate
HyperlinksEvaluateSelectionChange
NameMove 
ProtectContentsOLEObjects 
ProtectionPaste 
ProtectScenariosPasteSpecial 
RangePivotTables 
RowsPivotTablesWizard 
ScrollAreaSaveAs 
TypeSelect 
VisibleUnprotect 

 

Range集合对象——某一单元格、某一行、某一列、某一选定区域
属性方法方法
AddIndentActivate 
AddressAddCommentFillUp
AddressLocalAdvancedFilterFind
AllowEditApplyNamesFindNext
ApplicationApplyOutlineStylesFindPrevious
AreasAutoCompleteFunctionWizard
BordersAutoFillGoalSeek
CellsAutoFilterGroup
CharactersAutoFitInsert
ColumnAutoFormatJustify
ColumnsAutoOutlineMerge
ColumnWidthBorderAroundNavigateArrow
CommentCalculateNoteText
CountCheckSpellingParse
CreatorClearPasteSpecial
CurrentArrayClearCommentsPrintOut
CurrentRegionClearContentsPrintPreview
DependentsClearFormatsRemoveSubtotal
DirectDependentsClearNotesReplace
FontClearOutlineRowDifference
FormatConditionsClearDifferencesRun
FormulaConsolidateSelect
FormulaArrayCopySetPhonetic
FormulaHiddenCopyFromRecordsetShow
FormulaLabelCopyPictureShowDependents
FormulaLocalCreateNamesShowErrors
FormulaR1C1CreatePublisherShowPrecedents
FormulaR1C1LocalCutSort
HeightDataSeriesSortSpecial
NameDeleteSpeak
ValueDialogBoxSpecialCells
TextDirtySubscribeTo
RowEditionOptionsSubtotal
RowsFillDownTable
RangeFillLeftTextToColumns
RowHeightFillRightUnMerge

【Excel&VBA】VBA对象体系