Getting Started with Excel VBA

Quick start with Excel VBA

  • Excel VBA is same as classic Visual basic 6. Think of it as Visual Basic optimized for Excel
  • Every VBA are also called Macros inside Excel
  • You can program inside every excel sheet. Infact you can do some Visual Basic programming in every Excel document

First things firts

  • Macros can be a secruity thread inside Excel, therefore they are disabled by default
  • Enable macros in Excel 2007 by going to Excel Option > Marco Setting tab > Select All Macros with Notification
  • While you are in the same options go to first tabl named “Popular”, check the box next to “Show Developers tab in Ribbon”

You should now be all set to write your VBA program.

Write your first VBA program

At this point, lets assume you want to run a VBA program. Go to Developer tab click the 2nd left most icon “Macros”. It will popup a dialog called “Macro” asking for Macro name. You will see that this is empty because no program was written yet. Lets write one first

  1. Fire up Visual Basic by clicking left most icon in Developer ribbon tab called “Visual Basic”
  2. It will bring up a new IDE (Integrated Development Environment) that you probably are not familiar off. Pay attention to the left most column in the top, called Project
This entry was posted in Tutorials/Tips and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s