VBA Fundamentals-1

VBA Language : An Overview

This Article shows the VBA language elements, which are the keywords and control structures that are used to write VBA routines. Take a look at the following VBA Sub procedure. The procedure, calculates the sum of the first 10 integers. When the code finishes executing, the procedure displays a message with the result.
Sub sumint()
' This is a simple VBA Example
Dim Total As Long, i As Long
Total = 0
For i = 1 To 10
Total = Total + i
Next i
MsgBox Total
End Sub
This procedure uses some common VBA language elements, including the following:
  • A comment
  • A variable declaration statement
  • Variables
  • Assignment statements
  • A looping structure
  • A VBA function : MsgBox
In the next following Articles we will look into these elements in details. I hope you found the article helpful. Please share any further queries or recommendations and feedback with us in the comments section below.

Leave a Comment

Your email address will not be published. Required fields are marked *