• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

II. The VBA Programming Language > 5. Variables, Data Types, and Constants

Chapter 5. Variables, Data Types, and Constants

In the next few chapters, we will discuss the basics of the VBA programming language, which underlies all of the Microsoft Office programming environments. During our discussion, we will consider many short coding examples. I hope that you will take the time to key in some of these examples and experiment with them.

Comments

We have already discussed the fact that comments are important. Any text that follows an apostrophe is considered a comment and is ignored by Excel. For example, the first line in the following code is a comment, as is everything following the apostrophe on the third line:

' Declare a string variable
Dim WksName as String
WksName = Activesheet.Name   ' Get name of active sheet

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint