VBA101: A practical guide for VBA user

I wrote this guide a few months ago (September, 2010) and I think it might be something useful for people, who are interested in VBA (Visual Basic for Applications).

Things to know

  1. VBA stands for Visual Basic for Applications
  2. VBA only works with Microsoft Office for Windows
  3. VBA allows user to programmatically use Microsoft Office
  4. Press Alt+F11 to jump to Visual Basic Editor view

VBA can …

  1. Automatically update the document
  2. Connect to database and populate information
  3. Do Forms

How to write a Hello World in VBA

Sub MyHelloWorld()
MsgBox “Hello World”
End Sub

Note about VBA

  1. Comment is ‘
  2. No ; at the end of the line
  3. No {} for block code
  4. Use Dim to declare variable
  5. Assigning values to Primitive types do not require Set
Advertisements

One Response to VBA101: A practical guide for VBA user

  1. ckepley says:

    The nice thing about visual basic for applications and what makes it a skill set worth having is Microsoft office is the main program suite issued with almost every PC in the work force. Good job touching on this in “things to know”.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: