|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/excel-macros-and-vba-for-beginners/
课程评论:没有评论
课程名称:Excel宏与VBA入门 课程概述:本课程旨在教您如何使用宏来自动化Excel中的任务,从而提高工作效率并减少错误。宏是使用VBA(Visual Basic for Applications)编写的一系列指令,而VBA是由微软开发的编程语言。课程内容包括宏和子程序(sub)的定义,模块的使用,VBA编辑器的操作,以及如何在Excel中编写和运行代码。 课程内容包括: - 学习VBA及其在提高工作效率中的重要性 - 了解什么是宏 - 使用宏录制器创建宏 - 从零开始手动创建宏 - 编辑和调试宏 - 如何在Excel中编写和执行VBA代码 - 使宏能够与工作簿、工作表及其数据进行互动 - 查找并消除程序中的错误,使宏正常运行 - 使用宏进行自动化 - 从开发者选项卡或视图选项卡分析宏 - 检查VBA窗口及其组件 - 区分绝对引用和相对引用 - 如何保存包含宏的工作簿 - 创建模块 - 创建过程 - 理解模块与子程序之间的区别 - 在子程序中运行代码 本课程没有提供详细的大纲,但内容全面且实用,适合希望在Excel中提高效率的初学者。通过学习本课程,您将能够掌握VBA编程的基础知识,并能够利用宏自动化各种任务。
A macro is a sequence of instructions that automates some aspect of Excel so that you can work more efficiently and with fewer Errors. Macros are written in VBA, which stands for Visual Basic for Applications, is a programming language developed by Microsoft.Sub: A sub is made up of one or more lines of code. When we "Run" the sub, VBA goes through all the lines of code and carries out the appropriate actions. A macro and a sub are essentially the same thing.Module: A module is simply a container for our subs. A module contains subs which in turn contain lines of code. There is no limit(within reason) to the number of modules in a workbook or the number of subs in a module.VBA Editor: This is where we write our code. Pressing Alt + F11 switches between Excel and the Visual Basic Editor. If the Visual Basic editor is not currently open then pressing Alt + F11 will automatically open it. When we use the term Excel Macros we are referring to VBA. The term macro is essentially another name for a sub. Any time you see the terms Excel Macros or VBA just remember they are referring to the same thing.In VBA we create lines of instructions for VBA to process. We place the lines of code in a sub. These subs are stored in modules.We can place our subs in the module of the worksheet. However, we generally only place code for worksheet events here.In VBA, we create new modules to hold most of our subs. So for our first activity let's go ahead and create a new module.What you will learn:What VBA is and why it is so incredibly usefulWhat are MacrosCreating Macros using macro recorderCreating macro manually from scratchEditing MacrosDebugging MacrosHow to write VBA code and execute it in ExcelHow to make your macros work with workbooks, worksheets and the data on themHow to find and eliminate errors in your programs and make your macros runAutomation using macros.Analyse the macro from the Developer tab or the View tab.Examine the VBA window and VBA components.Distinguish between absolute and relative references.How to save workbook with macrosCreate a moduleCreate procedureCreate a subUnderstand the difference between a module and subRun the code in a sub