Summary

You cannot avoid declaration in a Visual Basic application. It appears each time you add a control to a form, when you call a procedure, or when you use a variable. Proper use of declaration keeps your source code readable and consistent. This chapter included the following key topics:

  • Name variables using the Hungarian naming conventions, employing the scope and tag values listed in this chapter. When defining new Hungarian tags, avoid conflicts with existing combinations. Use the appropriate Public, Private, or Dim keyword to declare each variable. Always use an As clause for all variable declarations. Use Hungarian tags in VBScript as if you were using the appropriate As clause after each variable declaration.

  • Constants appear in all ...

Get Visual Basic® Style Guide, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.