Introduction to VBA Excel Feature – Part 1
To start with VBA code, you need to have Development tab in your Microsoft excel and this will not be available by default.
Now, let’s go through the important components of VBA (Excel).
You can add any control you want by simply dragging onto your excel sheet.
Right, click on added control to see options available to customize the same as per your requirement. e.g. control’s property, formatting options etc.
Now, as you have already added the activeX control, it’s time to add some macro which will be executed by this control. Below steps will show the steps to write macros in Excel.
Visual Basic: It opens the development environment to write a macro for any control added on excel sheet. You can also write code for the various workbook and excel sheet events. To add code for the previously added button, either you can click Visual Basic button to go to development environment or simply right-click on the button and select “View Code”.
Above screen shows the development environment to write macros. The left box is called Project Explorer and you will find all excel sheets, forms, modules etc. Yes! You heard it right! You can add forms to simplify your work, like data entry. On your right, you can write your macros. I suggest exploring as much as you can to understand more available features.
Note: Remember to save your Microsoft excel file as “Macro-Enabled” for its functionality. Once you saved above excel, just click on the button to execute the added command.
Congratulations! You just executed your first VBA code i.e. macro.
This article is just to get you started with VBA and most of you are already aware of this. This is just the first part of VBA and I would be adding some more parts which will be very useful to automate various excel tasks to save your time. Stay connected to buzzanalysis.com for more useful posts by subscribing with your email address.
Thanks for reading…