Excel的对象模型
Excel对象模型说明;对象的属性方法事件
Application对象
Application属性;代表excel应用程序;application.activeworkbook;application.activesheet;application.activecell;Displayalerts;Screenupdating:statusbar。application的方法:Calculate;ontime; onkey ;quit
workbooks集合和workbook对象
workbooks属性:count;activeworkbook;thisworkbook;author;saved。方法:activate;add;open;close;Save/save as 。workbook对象的事件:beforeclose;beforeprint;beforesave;deactivate;newsheet;open;sheetactivate;sheetbeforedoubleclick;sheetbeforrightclick;sheetcalculate;sheetchange
Range对象
range对象:可以代表一个单元,行,列,复合单元或一个三维范围。range的属性:Address;cells Currentregion;Value;Offset;Entirerow/entirecolumn;count。range对象的方法:Activate;Autofit;clear; clearconments;clearcontents;clearformats;clearnotes;copy ;pastespecial
其他对象
用vba创建和修改图表;chart对象;用vba创建和修改透视表
VBA窗体
创建窗体;创建窗体控件;控件代码编写;调用窗体