VBA - Boolean Datatypes

Boolean values can contain "True" or "False". These are the most basic values that a computer can process - think of a single bit assigned to 1 (True) or 0 (False).

In programming the concept of flags is useful to creating clear and readable code. A flag is a variable that can be a Boolean value. The variable will be assigned a value until a set criteria is met, then once the flag is changed the flow of the program can change.


Code Snippet:

Sub a4_1_boolean()

Dim x As Boolean

x = False

End Sub




Related Sections

Python - Learn the python from the basics up. This fast track example code course will get you creating powerful python programs in no time.



Must Read Articles


VBA and Microsoft Excel - Getting the most out of excel with VBA programming
VBA and Microsoft Word - Getting the most out of word with VBA programming
Application Object - Using the applications features in your code.
Installing VBA and First Program - What do you need to start using visual basic application VBA.