Boolean data type
Boolean variables are stored as 16-bit (2-byte) numbers, but they can only be True or False.
Boolean variables display as either:
True
orFalse
(when Print is used), or#TRUE#
or#FALSE#
(when Write # is used).
Use the keywords True and False to assign one of the two states to Boolean variables.
When other numeric types are converted to Boolean values, 0 becomes False and all other values become True.
When Boolean values are converted to other data types, False becomes 0 and True becomes -1.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for