当前位置:网站首页>Excel uses Visual Basic Editor to modify macros
Excel uses Visual Basic Editor to modify macros
2022-07-30 15:32:00 【night drift ice】
The macro in Excel is a very powerful tool. When we use Excel for tasks, for certain needs, such as the needs of the boss, customers or other needs, we need to use Excel as a table tool to complete the production of charts, inputProcessing information, etc.
And our operations can be recorded using macros. Next time, we only need to press a button, and all these operations can be automatically executed again. Once macros are used, we can get twice the result with half the effort.
This is the power of office automation and the advantage of computer software. It's like writing a wrong word on paper, it will be very troublesome, but if the operation is wrong in the software, just ctrl+z to retractYou can do it in one step.
Tools, technologies are dead, they are not powerful, it is the people who use them that are powerful.Therefore, as a user, you need to discover your needs and usage scenarios, use tools to cooperate with you, and find the best solution to the problem.
Then learning how to record macros can make our repetitive work easier and faster.
But sometimes things change, and recorded macros can be affected and don't perform well.
At this time, we do not need to re-record or create new macros, but we can use the previous macros to make some modifications to the places that need to be modified.
In order to edit the macro, we need to touch the content of the code level, we need to use the Visual Basic Editor (VBE).
Open View->Macro->View Macros.
Click Edit to edit, and the Visual Basic Editor interface appears.
This is a brand new Window, separate from Excel.The macros you record and the code you write for you in the background are here.
The unit of code storage, this window opens, is called module.
Then here, we can find the place we want to modify and modify it, such as changing the month "Jan, Feb, Mar" to "Apr, May, Jun".
Visual Basic Editor
VBE is the VBA (Visual Basic for Applications) development environment built into Excel.
ALT + F11, can quickly call out the VBE, instead of entering from the editing macro as above.
After opening, there are two windows on the left, one is the Project Window and the other is the properties window, which can be closed or opened.
In the View menu, you can find options for these two windows:
VBA Modules
When you open VBE, you need a place to store VBA code.
A common approach is to store code in modules, aka modules.
In VBE, in the project window, you can see the reference of your Workbook, and there is a reference to the sheet below, you can see all the contents of this project.
To add a module to the project to add your own code, click the menu Insert -> Module.
You can see a Modules folder appear in the project window, which has a Module file in which you can write VBA code.
边栏推荐
- 第十一章 api mgmnt API 参考
- 本地事务与分布式事务
- MASM32v11编程调用Process32First失败: 程序发出命令,但命令长度不正确
- 泡沫褪去,DeFi还剩下什么
- postgresql的普通字符串和转义字符串
- 惊艳!京东T8纯手码的Redis核心原理手册,基础与源码齐下
- What is the relationship between the construction of smart cities and 5G technology in the new era
- GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
- 分布式前修课:MySQL实现分布式锁
- Sentinel
猜你喜欢
阿里CTO程立:阿里巴巴的开源历程、理念和实践
ISELED---氛围灯方案的新选择
MongoDB starts an error Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
(Crypto必备干货)详细分析目前NFT的几大交易市场
元宇宙邮局AI航天主题系列数字藏品 将于7月30日10:00点上线“元邮数藏”
Redis cache penetration, breakdown, avalanche and consistency issues
浅析显卡市场的未来走向:现在可以抄底了吗?
Sentinel
四大首搭加持,美学、安全、操控、效率优势明显,比亚迪海豹售价20.98万元起售!
Alluxio for Presto fu can across the cloud self-service ability
随机推荐
有关收集箱的改进建议
GeoServer
Redis cache penetration, breakdown, avalanche and consistency issues
智能合约安全——私有数据访问
Office Automation | Office Software and Edraw MindMaster Shortcuts
分布式前修课:MySQL实现分布式锁
Mac 中 MySQL 的安装与卸载
Flink实时仓库-DWS层(状态编程,windowall的使用,数据保存到clickhouse)模板代码
【元胞自动机】基于元胞自动机模拟生命演化、病毒感染等实例附matlab代码
What is the relationship between the construction of smart cities and 5G technology in the new era
视频加密的误解
基于FPGA的DDS任意波形输出
MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
编译、链接 - 笔记 - 3
调试 - 笔记
[深入研究4G/5G/6G专题-46]: 5G Link Adaption链路自适应-2-常见缩略语
HUAWEI CLOUD Releases Open Source Software Governance Service - Software Component Analysis
ECCV 2022 | Towards Data Efficient Transformer Object Detectors
Excel使用Visual Basic Editor对宏进行修改
5G-based Warehousing Informatization Solution 2022