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

Part VIII: Appendices > Tags for Constants

Tags for Constants

VBA constants always have one data type. Because VBA will define the data type for you if you do not do so yourself, you should specify the data type for constants. Constants that are contained in the general declarations section should have the keyword Private or Public, and should be given the prefix m or g. The constant is indicated by adding the letter c to the tag:

Const intcStandard As Integer = 3
Private Const mdblcPi As Double = 3.14159265358


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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