Visual Basic Recap

By Herbert J. Bernstein

© Copyright 1999 Herbert J. Bernstein

Visual Basic is a large, complex system, available in many versions. This is a recap of some of the more important points for review.

A Visual Basic program uses a Graphical User Interface (GUI) to place objects on a form. Various events involving the objects cause event-handlers to be executed. The event handlers are subprograms delimited by "Private Sub ObjectName_Event" and "End Sub" statements on a page of code. The user may add variable and array definitions for storage of various types that are valid for the entire execution of the program in the (General) section of the code page, and may write subprograms and functions which contain local storage allocation and executable stements.

Flowcharts may be helpful in understanding code and in organizing new programs.

The code the user writes for event handlers and for other subprograms and functions may use conditional statements, may create loops to repeat sections of code, and may reference files on disk.

A Calculator is a good example of the sort of program that can be created with Visual Basic.