Monday, January 20, 2025

2025-01-21 About Visual Basic for Applications in MSExcel - Excel-VBA

 2025-01-21 About Visual Basic for Applications in MSExcel - Excel-VBA

We are sure our esteemed readers are quite aware of what Visual Basic For Applications (VBA) is and how it can be accessed from the Microsoft Excel interface, still, to put the basics into the right perspective, we shall revise the same. So, first you have to learn how to enable the Developer's Menu in Microsoft Excel. So first you have to go to the main menu of excel and then scroll down to the option menu, as shown in the below Figure 1. On the bottom left hand corner you will find Options, with the quick access short-cut key as "T".

Figure 1 - Main Menu of Excel

Okay, now that you have discovered the Options menu, you just click it and VOILA, the options Dialog Box appears, as shown in Figure 2 below.

Figure 2 - Options Dialog Box

In the options Dialog Box, you can see that the "Customize Ribbon" option has already been selected in the left hand menu (appearing under 'Excel Options'). If the right hand 'Customize the Ribbon' does not show "Developer", as it does in the above figure, it could be that your graphic resolution may be a little lower than what is needed to display, in which case you just have to scroll down under the "Main Tabs", till you come to "Developer", nestled between "Automate" and "Add-Ins" options. By default, it would be unchecked, so you just have to click on it with your mouse, or navigate with your keyboard arrows and press space-bar. VOILA, the Developer menu will appear in your main Excel Interface, as shown in Figure 3 below.

Figure 3 - Excel Main Interface

That is all that you need, to enable "Developer" menu. In order to start coding in the Visual Basic Environment (VBE), all you have to do is to click on the "Visual Basic" icon that appears on the extreme left corner of the "Developer" menu.

Figure 4 - Developer Menu Selected

Okay, so now, when you click Visual Basic, what happens is that a new windows opens up, as shown below.

Figure 5 - Visual Basic Environment Window
In this window, you can finally start coding. At this point of time, all we can say is that using the "Insert" Menu, you can insert a new Module, Class Module or Userform, which will have to be coded, for it to work, and you have to plan your code in advance before you can start designing the Userform. The Class Module is something that you will learn in the "Advanced VBA Training" sessions, while in the "Basic VBA Training" you will receive training on how to use the "Macro Recorder" in MS Excel to create a new module and later how to code your own module(s) to create "User Defined Functions (UDF)" and to create various Sub-Procedures for carrying out an instruction on the given data.

That's all, folks, for this post. Apply now for the "Visual Basic for Applications (Excel-VBA)" course today itself by logging onto "Excel Trainer Ahmedabad Blog", where the link to join the classes will be avaliable after January 30th, 2025. This facility is also likely to be made available at my Excel-VBA-AHMFCA Website too, so be dure to check there as well. Cheers !!

CA Vikram Shankar Mathur
cavs.mathur@gmail.com
+91-9998090111 / +91-8460890111
=============================================================