当前位置:网站首页>VBA common objects
VBA common objects
2022-07-25 06:06:00 【N-order magic cube】
VBA There are four basic concepts in : object 、 attribute 、 Methods and events .
workbook 、 Worksheet 、 Cell 、 Comments 、 PivotTable 、 AutoShape 、 Names and so on are objects ,VBA It is the language used to process these objects .
First of all ,excel vba Introduction to basic concepts of objects
excel vba There are many objects , Each object has its own properties and methods .
excel vba What is the object ?VBA Is an object-oriented programming language .
Excel The operation of is almost all around the workbook 、 Worksheet 、 Cell expanded , These are the Excel The core object of the operation , These are also VBA Core objects of .
about Excel Come on , The outermost vba Object is Application, On behalf of the entire Excel Applications .
Every Excel file , They all correspond to one Workbook;
Every... In the document Sheet Worksheet , They all correspond to one Worksheet;
Cells in the form , The corresponding is Range object .
From above for excel vba Introduction to objects , You can easily see the hierarchical relationship and containment relationship of each object :
Application The object must contain a Workbooks aggregate , To express Excel Every file in the library ;
Workbook The object must include a Worksheets aggregate , To represent all the worksheets it contains ;
Worksheet The object must contain Range perhaps Cells object , To identify the cells it contains ;
second ,excel vba Common object display
VBA object , The most important are 4 Kind of :Application,Workbook,Worksheet,Range( Cell ).
Here is excel vba Common objects and meanings in objects .
Application object : Represents the whole excel Applications
Window object : Represents a window
Worksheet object : Form a worksheet
Sheets object : Specify a set of all worksheets in the active workbook
Shaperange object : Represents the shape area , Is a set of shapes in the document
pivotTable object : Represents a PivotTable in a worksheet
workbook object : It means a excel Workbooks .
Range object : Represents a cell 、 A line 、 A column 、 A selected area, etc .
Name object : Represents the definition name of the cell range .
Chart object : Represents the chart in the workbook
Filedialog object : Provide file dialog .
Commandbarpopup object : Represents a pop-up control on the command bar
Commandbar object : Represents the command bar .
Third ,excel vba Object summary
VBA Operations on objects always follow this format : object . attribute 、 object . Method 、 parent object . Sub object . attribute .
excel vba object , It can also be defined like ordinary variables .
Dim testBook As Workbook
Dim testSheet As Worksheet
Dim testRange As Range
边栏推荐
- The computer accesses the Internet normally with the same network cable, and the mobile phone connects to WiFi successfully, but it cannot access the Internet
- Prometheus operator configures promethesrule alarm rules
- (15) [driver development] over written copy
- 阻塞队列分析
- NFT: how to improve rentable NFT (erc-4907)
- 基于ISO13209(OTX)实现EOL下线序列
- Daily question brushing record (XXVIII)
- PHP warehouse inventory management system source code WMS source code
- Please stop using system The currenttimemillis() statistical code is time-consuming, which is really too low!
- Use abp Zero builds a third-party login module (4): wechat applet development
猜你喜欢

"Everyday Mathematics" serial 61: March 1

Difference between NPX and NPM
This is how the permission system is designed, yyds

Unity model simplification / consolidation one click plug-in

(牛客多校二)J-Link with Arithmetic Progression(最小二乘法/三分)

Amazoncaptcha bypasses Amazon IP verification code with 95% success rate

新时代生产力工具——FlowUs 息流全方位评测

Android interview question: why do activities rebuild ViewModel and still exist—— Jetpack series (3)

剑指 Offer 54. 二叉搜索树的第k大节点
![(14)[驱动开发]配置环境 VS2019 + WDK10 写 xp驱动](/img/90/0d94d26be8128d77de65919763fda5.png)
(14)[驱动开发]配置环境 VS2019 + WDK10 写 xp驱动
随机推荐
出于数据安全考虑,荷兰教育部要求学校暂停使用 Chrome 浏览器
【每日一练】day(14)
(牛客多校二)J-Link with Arithmetic Progression(最小二乘法/三分)
ABC 261.D - Flipping and Bonus ( DP )
Leetcode/ integer division
基于ISO13209(OTX)实现EOL下线序列
Context must be a dict rater solution
Base64 (conversion between string and Base64 string)
(14) [driver development] configuration environment vs2019 + wdk10 write XP driver
Msys2 common configuration
Amazoncaptcha 95%成功率绕过亚马逊IP验证码
New discovery of ROS callback function
sqlilabs less-28~less-8a
Unity model simplification / consolidation one click plug-in
HTB-Beep
Working principle and precautions of bubble water level gauge
求求你别再用 System.currentTimeMillis() 统计代码耗时了,真的太 Low 了!
For data security reasons, the Dutch Ministry of Education asked schools to suspend the use of Chrome browser
R language ggpubr package ggarrange function combines multiple images and annotates_ Figure add annotation, annotation, annotation information for the combined image, and use the right parameter to ad
Sword finger offer 36. binary search tree and bidirectional linked list