Excel Macros Coding Tutorial (Learn VBA in Excel in 1 Hour)
Автор: Excel Champs
Загружено: 2022-04-16
Просмотров: 24379
➡️ Subscribe Now ➜ https://bit.ly/free-excel-videos 👀
Excel Macro Coding can be done using the VBA language.
Content of the Video
Mistake People Make While Learning VBA (0:00)
1. CONCEPT OF VBA (00:16)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
In this section, you will understand the concept of VBA as a programming language. The point is if you want to learn VBA, you need to understand how it works as a programming language.
2. VISUAL BASIC EDITOR (02:18)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Visual Basic Editor is the application where we write codes and save then to execute. The best part is you don't need to install this application it's already there in Excel.
3. WRITE YOUR FIRST CODE (06:06)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
In this section of this video, we will write a basic code to give you some hands-on VBA. Give you an initial idea of how to write a code in VBA.
4. ENABLE MACROS (11:24)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Microsoft won't allow you run a macro in Excel until you enable a macros in it. It's disabled by default because it might be little unsecure if you don't know about security precautions that comes with macros.
5. UNDERSTANDING OBJECTS (17:24)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
VBA is an object object oriented language. And with each object comes properties and method which you can use to perform activities with an object.
6. COPY PASTE USING VBA (24:33)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
This is one of the basic tasks that you do in Excel. And with a VBA code you can do with a single click and save time.
7. USING EXCEL FUNCTION IN VBA (28:32)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
There’s a property in VBA called WorksheetFunction that gives you access to all the functions that you have in Excel.
8. SHOW A MESSAGE BOX (32:26)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
One of my favorite thing in VBA is using a message box. You can create a message box to show to the user a specific message.
9. GET RESPONSE WITH AN INPUT BOX (36:26)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
You can also create an Input Box that let a user enter a response in an input bar and then you can save that response in a cell.
10. TEST YOUR CODE (37:36)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Once you write a code, the next this that you need to immediately is to text your code. In VBA editor, there’s a button called step into that you can use to do this.
11. ADD COMMENTS IN A CODE (40:57)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
A comment is a green line of text that helps you to describe the written code. In simple words, a comment is a line of text which is not a code and VBA ignores it while executing the code.
12. CONSTANT AND VARIABLES (42:21)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
A constant and a variable is a storage box that is itself stored in your system and it can store a value in it for you,
13. IF STATEMENT (47:47)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Just like Excel, in VBA, you can also write IF statement to a text a condition and then perform activity if that condition is true, else perform something else if that condition is false.
#VBAForBeginners #VBATutorials #LearnVBA
About ExcelChamps
The ExcelChamps YouTube Channel is the part of ExcelChamps.com Blog that helps people to learn Microsoft Excel by providing some high-quality blog posts. On ExcelChamps YouTube Channel, we provide videos of the same quality to make education more accessible to the people out there.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: