Computer Visual Basic Research
Computer Visual Basic Research
Visual Basic 1.0 was introduced in 1991. The drag and drop design for creating the user interface is
derived from a prototype form generator developed by Alan Cooper and his company called Tripod. Alan
Cooper (born June 3, 1952) is an American software designer and programmer. Widely recognized as the
"Father of Visual Basic",[1] Cooper is also known for his books About Face: The Essentials of Interaction
Design and The Inmates Are Running the Asylum: Why High-Tech Products Drive Us Crazy and How to
Restore the Sanity. Alan Cooper grew up in Marin County, California, United States where he attended
the College of Marin, studying architecture. He learned programming and took on contract programming
jobs to pay for college. In 1975, soon after he left college and as the first microcomputers became
available, Alan Cooper founded his first company, Structured Systems Group (SSG), in Oakland,
California, which became one of the first microcomputer software companies. SSG's software accounting
product, General Ledger, was sold through ads in popular magazines such as Byte and Interface Age. On
April 28, 2017, Alan was inducted into the Computer History Museum's Hall of Fellows "for his
invention of the visual development environment in Visual BASIC. During the 1980s, Alan Cooper
authored several business applications including Microphone II for Windows and an early, critical-path
project management program called SuperProject. Cooper sold SuperProject to Computer Associates in
1984, where it achieved success in the business-to-business marketplace. In 1988, Alan Cooper created a
visual programming language (code-named “Ruby”) that allowed Windows users to build “Finder” like
shells. He called it a shell construction set. After he demonstrated Ruby to Bill Gates, Microsoft
purchased it. At the time, Gates commented that the innovation would have a “profound effect” on their
entire product line. Microsoft initially decided not to release the product as a shell for users, but rather to
transform it into a professional development tool for their QuickBASIC programming language called
Visual Basic, which was widely used for business application development for Windows computers. In
2017, Cooper became part of Designit, a strategic design arm of Wipro Digital. Cooper Professional
Education continued to exist as a teaching and learning division of Designit until it closed its doors to
business on May 29, 2020.
Sub MakeActive()
Windows(2).Activate
End Sub
Dim statement syntax Dim varname [([ subscripts ])] [ As type, ] [ varname [([ subscripts ])] [ As type ]]
...
In the Dim statement syntax, the word Dim is a required keyword. The only required element
is varname (the variable name).
For example, the following statement creates three variables: myVar, nextVar, and thirdVar. These
are automatically declared as Variant variables.
The following example declares a variable as a String. Including a data type saves memory and can help
you find errors in your code.
To declare several variables in one statement, include the data type for each variable. Variables declared
without a data type are automatically declared as Variant.
The shorthand for the types is: % -integer; & -long; @ -currency; # -double; ! -single; $ -string
If you are declaring an array variable, you must include parentheses. The subscripts are optional. The
following statement dimensions a dynamic array, myArray.
Dim myArray()
Arguments for functions and methods can be specified in code either by position or by name. To specify arguments
by position, follow the order presented in the syntax, separating each argument with a comma, for example
To specify an argument by name, use the argument name followed by a colon and an equal sign (:=), and the
argument's value. You can specify named arguments in any order, for example
The syntax for functions and some methods shows the arguments enclosed in parentheses. These functions and
methods return values, so you must enclose the arguments in parentheses to assign the value to a variable. If you
ignore the return value or if you don't pass arguments at all, don't include the parentheses. Methods that don't return
values don't need their arguments enclosed in parentheses. These guidelines apply whether you are using positional
arguments or named arguments.
In the following example, the return value from the MsgBox function is a number indicating the selected button that
is stored in the variable myVar. Because the return value is used, parentheses are required. Another message box then
displays the value of the variable.
Sub Question()
MsgBox myVar
End Sub
Option Compare statement syntax Option Compare { Binary | Text | Database }
In the Option Compare statement syntax, the braces and vertical bar indicate a mandatory choice between three
items. (Do not type the braces in the Visual Basic statement). For example, the following statement specifies that
within the module, strings will be compared in a sort order that is not case-sensitive.
Visual Basic for Applications runs as an internal programming language in Microsoft Office (MS Office,
Office) applications such as Access, Excel, PowerPoint, Publisher, Word, and Visio. The most popular
type of Visual Basic in use today is VBA. VBA is a version of Visual Basic that can be used to program
Microsoft Office apps, such as Excel and PowerPoint. Its advantage is that Visual Basic is an event-
driven programming language and environment from Microsoft that provides a graphical user interface
(GUI) which allows programmers to modify code by simply dragging and dropping objects and defining
their behavior and appearance, It is particularly easy to develop graphical user interfaces and to connect
them to handler functions provided by the application, and its disadvantage are that it cannot handle
pointers directly. This is a significant disadvantage since pointers are much necessary for programming.
Any additional coding will lead to many CPU cycles, requiring more processing time, also These
languages require computers with more memory, high storage capacity of hard disk, and faster processor.
These languages can only be implemented on graphical operating systems like Linux and windows. The
execution speed of visual applications is slow.