<s>
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
(	O
VBA	B-Language
)	O
is	O
an	O
implementation	O
of	O
Microsoft	O
's	O
event-driven	B-Application
programming	I-Application
language	O
Visual	B-Language
Basic	I-Language
6.0	I-Language
built	O
into	O
most	O
desktop	O
Microsoft	B-Application
Office	I-Application
applications	O
.	O
</s>
<s>
Although	O
based	O
on	O
pre-.NET	O
Visual	B-Language
Basic	I-Language
,	O
which	O
is	O
no	O
longer	O
supported	O
or	O
updated	O
by	O
Microsoft	O
,	O
the	O
VBA	B-Language
implementation	O
in	O
Office	O
continues	O
to	O
be	O
updated	O
to	O
support	O
new	O
Office	O
features	O
.	O
</s>
<s>
VBA	B-Language
is	O
used	O
for	O
professional	O
and	O
end-user	O
development	O
due	O
to	O
its	O
perceived	O
ease-of-use	O
,	O
Office	O
's	O
vast	O
installed	O
userbase	O
,	O
and	O
extensive	O
legacy	O
in	O
business	O
.	O
</s>
<s>
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
enables	O
building	O
user-defined	B-Language
functions	I-Language
(	O
UDFs	O
)	O
,	O
automating	O
processes	O
and	O
accessing	O
Windows	B-Library
API	I-Library
and	O
other	O
low-level	O
functionality	O
through	O
dynamic-link	O
libraries	B-Library
(	O
DLLs	O
)	O
.	O
</s>
<s>
It	O
supersedes	O
and	O
expands	O
on	O
the	O
abilities	O
of	O
earlier	O
application-specific	O
macro	O
programming	O
languages	O
such	O
as	O
Word	B-Application
's	I-Application
WordBASIC	B-Language
.	O
</s>
<s>
As	O
its	O
name	O
suggests	O
,	O
VBA	B-Language
is	O
closely	O
related	O
to	O
Visual	B-Language
Basic	I-Language
and	O
uses	O
the	O
Visual	B-Language
Basic	I-Language
Runtime	O
Library	O
.	O
</s>
<s>
However	O
,	O
VBA	B-Language
code	O
normally	O
can	O
only	O
run	O
within	O
a	O
host	O
application	O
,	O
rather	O
than	O
as	O
a	O
standalone	B-General_Concept
program	I-General_Concept
.	O
</s>
<s>
VBA	B-Language
can	O
,	O
however	O
,	O
control	O
one	O
application	O
from	O
another	O
using	O
OLE	B-Application
Automation	I-Application
.	O
</s>
<s>
For	O
example	O
,	O
VBA	B-Language
can	O
automatically	O
create	O
a	O
Microsoft	B-Application
Word	I-Application
report	O
from	O
Microsoft	B-Application
Excel	I-Application
data	O
that	O
Excel	B-Application
collects	O
automatically	O
from	O
polled	O
sensors	O
.	O
</s>
<s>
VBA	B-Language
can	O
use	O
,	O
but	O
not	O
create	O
,	O
ActiveX/COM	B-Application
DLLs	O
,	O
and	O
later	O
versions	O
add	O
support	O
for	O
class	O
modules	O
.	O
</s>
<s>
VBA	B-Language
is	O
built	O
into	O
most	O
Microsoft	B-Application
Office	I-Application
applications	O
,	O
including	O
Office	B-Application
for	I-Application
Mac	I-Application
OS	O
X	O
(	O
except	O
version	O
2008	O
)	O
,	O
and	O
other	O
Microsoft	O
applications	O
,	O
including	O
Microsoft	B-Application
MapPoint	I-Application
and	O
Microsoft	B-Application
Visio	I-Application
.	O
</s>
<s>
VBA	B-Language
is	O
also	O
implemented	O
,	O
at	O
least	O
partially	O
,	O
in	O
applications	O
published	O
by	O
companies	O
other	O
than	O
Microsoft	O
,	O
including	O
ArcGIS	B-Application
,	O
AutoCAD	B-Algorithm
,	O
CorelDraw	B-Application
,	O
Kingsoft	B-Application
Office	I-Application
,	O
LibreOffice	B-Application
,	O
,	O
SolidWorks	B-Application
,	O
WordPerfect	B-Application
,	O
and	O
UNICOM	O
System	B-Application
Architect	I-Application
(	O
which	O
supports	O
VBA	B-Language
7.1	O
)	O
.	O
</s>
<s>
Code	O
written	O
in	O
VBA	B-Language
is	O
compiled	B-Language
to	O
Microsoft	B-Application
P-Code	I-Application
(	O
pseudo-code	O
)	O
,	O
a	O
proprietary	B-Application
intermediate	O
language	O
,	O
which	O
the	O
host	O
applications	O
(	O
Access	B-Application
,	O
Excel	B-Application
,	O
Word	B-Application
,	O
Outlook	B-Application
,	O
and	O
PowerPoint	B-Application
)	O
store	O
as	O
a	O
separate	O
stream	B-Architecture
in	O
COM	B-Library
Structured	I-Library
Storage	I-Library
files	O
(	O
e.g.	O
,	O
.doc	O
or	O
.xls	O
)	O
independent	O
of	O
the	O
document	O
streams	O
.	O
</s>
<s>
The	O
intermediate	O
code	O
is	O
then	O
executed	O
by	O
a	O
virtual	B-Architecture
machine	I-Architecture
(	O
hosted	O
by	O
the	O
host	O
application	O
)	O
.	O
</s>
<s>
Despite	O
its	O
resemblance	O
to	O
many	O
old	O
BASIC	O
dialects	O
(	O
particularly	O
Microsoft	B-Language
BASIC	I-Language
,	O
from	O
which	O
it	O
is	O
indirectly	O
derived	O
)	O
,	O
VBA	B-Language
is	O
incompatible	O
with	O
any	O
of	O
them	O
except	O
Visual	B-Language
Basic	I-Language
,	O
where	O
source	O
code	O
of	O
VBA	B-Language
modules	O
and	O
classes	O
can	O
be	O
directly	O
imported	O
,	O
and	O
which	O
shares	O
the	O
same	O
library	O
and	O
virtual	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
Compatibility	O
ends	O
with	O
Visual	B-Language
Basic	I-Language
version	O
6	O
;	O
VBA	B-Language
is	O
incompatible	O
with	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
(	O
VB.NET	B-Language
)	O
.	O
</s>
<s>
VBA	B-Language
is	O
proprietary	B-Application
to	O
Microsoft	O
and	O
,	O
apart	O
from	O
the	O
COM	O
interface	O
,	O
is	O
not	O
an	O
open	O
standard	O
.	O
</s>
<s>
Interaction	O
with	O
the	O
host	O
application	O
uses	O
OLE	B-Application
Automation	I-Application
.	O
</s>
<s>
Typically	O
,	O
the	O
host	O
application	O
provides	O
a	O
type	O
library	O
and	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
documentation	O
which	O
document	O
how	O
VBA	B-Language
programs	O
can	O
interact	O
with	O
the	O
application	O
.	O
</s>
<s>
This	O
documentation	O
can	O
be	O
examined	O
from	O
inside	O
the	O
VBA	B-Language
development	O
environment	O
using	O
its	O
Object	O
Browser	O
.	O
</s>
<s>
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
programs	O
which	O
are	O
written	O
to	O
use	O
the	O
OLE	B-Application
Automation	I-Application
interface	O
of	O
one	O
application	O
cannot	O
be	O
used	O
to	O
automate	O
a	O
different	O
application	O
,	O
even	O
if	O
that	O
application	O
hosts	O
the	O
Visual	B-Language
Basic	I-Language
runtime	O
,	O
because	O
the	O
OLE	B-Application
Automation	I-Application
interfaces	O
will	O
be	O
different	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
VBA	B-Language
program	O
written	O
to	O
automate	O
Microsoft	B-Application
Word	I-Application
cannot	O
be	O
used	O
with	O
a	O
different	O
word	B-Application
processor	O
,	O
even	O
if	O
that	O
word	B-Application
processor	O
hosts	O
VBA	B-Language
.	O
</s>
<s>
Conversely	O
,	O
multiple	O
applications	O
can	O
be	O
automated	O
from	O
the	O
one	O
host	O
by	O
creating	O
Application	O
objects	O
within	O
the	O
VBA	B-Language
code	O
.	O
</s>
<s>
References	O
to	O
the	O
different	O
libraries	B-Library
must	O
be	O
created	O
within	O
the	O
VBA	B-Language
client	O
before	O
any	O
of	O
the	O
methods	O
,	O
objects	O
,	O
etc	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
VBA	B-Language
code	O
written	O
in	O
Microsoft	B-Application
Access	I-Application
can	O
establish	O
references	O
to	O
the	O
Excel	B-Application
,	O
Word	B-Application
and	O
Outlook	B-Application
libraries	B-Library
;	O
this	O
allows	O
creating	O
an	O
application	O
that	O
–	O
for	O
instance	O
–	O
runs	O
a	O
query	O
in	O
Access	B-Application
,	O
exports	O
the	O
results	O
to	O
Excel	B-Application
and	O
analyzes	O
them	O
,	O
and	O
then	O
formats	O
the	O
output	O
as	O
tables	O
in	O
a	O
Word	B-Application
document	O
or	O
sends	O
them	O
as	O
an	O
Outlook	B-Application
email	O
.	O
</s>
<s>
VBA	B-Language
programs	O
can	O
be	O
attached	O
to	O
a	O
menu	O
button	O
,	O
a	O
macro	O
,	O
a	O
keyboard	O
shortcut	O
,	O
or	O
an	O
OLE/COM	O
event	O
,	O
such	O
as	O
the	O
opening	O
of	O
a	O
document	O
in	O
the	O
application	O
.	O
</s>
<s>
The	O
language	O
provides	O
a	O
user	O
interface	O
in	O
the	O
form	O
of	O
UserForms	O
,	O
which	O
can	O
host	O
ActiveX	B-Application
controls	I-Application
for	O
added	O
functionality	O
.	O
</s>
<s>
Inter-process	B-Operating_System
communication	I-Operating_System
automation	O
includes	O
the	O
Dynamic	B-Operating_System
Data	I-Operating_System
Exchange	I-Operating_System
(	O
DDE	O
)	O
and	O
RealTimeData	B-General_Concept
(	O
RTD	O
)	O
which	O
allows	O
calling	O
a	O
Component	B-Application
Object	I-Application
Model	I-Application
(	O
COM	O
)	O
automation	O
server	O
for	O
dynamic	O
or	O
realtime	O
financial	O
or	O
scientific	O
data	O
.	O
</s>
<s>
As	O
with	O
any	O
common	O
programming	O
language	O
,	O
VBA	B-Language
macros	I-Language
can	O
be	O
created	O
with	O
malicious	O
intent	O
.	O
</s>
<s>
Using	O
VBA	B-Language
,	O
most	O
of	O
the	O
security	O
features	O
lie	O
in	O
the	O
hands	O
of	O
the	O
user	O
,	O
not	O
the	O
author	O
.	O
</s>
<s>
The	O
VBA	B-Language
host	O
application	O
options	O
are	O
accessible	O
to	O
the	O
user	O
.	O
</s>
<s>
The	O
user	O
who	O
runs	O
any	O
document	O
containing	O
VBA	B-Language
macros	I-Language
can	O
preset	O
the	O
software	O
with	O
user	O
preferences	O
.	O
</s>
<s>
End-users	O
can	O
protect	O
themselves	O
from	O
attack	O
by	O
disabling	O
macros	O
from	O
running	O
in	O
an	O
application	O
or	O
by	O
granting	O
permission	O
for	O
a	O
document	O
to	O
run	O
VBA	B-Language
code	O
only	O
if	O
they	O
are	O
sure	O
that	O
the	O
source	O
of	O
the	O
document	O
can	O
be	O
trusted	O
.	O
</s>
<s>
In	O
February	O
2022	O
,	O
Microsoft	O
announced	O
its	O
plan	O
to	O
block	O
VBA	B-Language
macros	I-Language
in	O
files	O
downloaded	O
from	O
the	O
Internet	O
by	O
default	O
in	O
a	O
variety	O
of	O
Office	O
apps	O
due	O
to	O
their	O
widespread	O
use	O
to	O
spread	O
malware	O
.	O
</s>
<s>
VBA	B-Language
was	O
first	O
launched	O
with	O
MS	B-Application
Excel	I-Application
5.0	O
in	O
1993	O
.	O
</s>
<s>
It	O
became	O
an	O
instant	O
success	O
among	O
developers	O
to	O
create	O
corporate	O
solutions	O
using	O
Excel	B-Application
.	O
</s>
<s>
Inclusion	O
of	O
VBA	B-Language
with	O
Microsoft	O
Project	O
,	O
Access	B-Application
and	O
Word	B-Application
replacing	O
Access	B-Application
BASIC	O
and	O
Word	B-Application
BASIC	O
respectively	O
made	O
it	O
more	O
popular	O
.	O
</s>
<s>
VBA	B-Language
4.0	O
is	O
the	O
next	O
famous	O
release	O
with	O
a	O
totally	O
upgraded	O
version	O
compared	O
to	O
previous	O
one	O
.	O
</s>
<s>
VBA	B-Language
5.0	O
was	O
launched	O
in	O
1997	O
along	O
with	O
all	O
of	O
MS	B-Application
Office	I-Application
97	O
products	O
.	O
</s>
<s>
The	O
only	O
exception	O
for	O
this	O
was	O
Outlook	B-Application
97	O
which	O
used	O
VBScript	B-Application
.	O
</s>
<s>
VBA	B-Language
6.0	O
and	O
VBA	B-Language
6.1	O
were	O
launched	O
in	O
1999	O
,	O
notably	O
with	O
support	O
for	O
COM	O
add-ins	O
in	O
Office	O
2000	O
.	O
</s>
<s>
VBA	B-Language
6.2	O
was	O
released	O
alongside	O
Office	O
2000	O
SR-1	O
.	O
</s>
<s>
VBA	B-Language
6.3	O
was	O
released	O
after	O
Office	O
XP	O
,	O
VBA	B-Language
6.4	O
followed	O
Office	O
2003	O
and	O
VBA	B-Language
6.5	O
was	O
released	O
with	O
Office	O
2007	O
.	O
</s>
<s>
Office	B-Operating_System
2010	I-Operating_System
includes	O
VBA	B-Language
7.0	O
.	O
</s>
<s>
There	O
are	O
no	O
new	O
features	O
in	O
VBA	B-Language
7	O
for	O
developers	O
compared	O
to	O
VBA	B-Language
6.5	O
except	O
for	O
64-bit	O
support	O
.	O
</s>
<s>
However	O
,	O
after	O
VBA	B-Language
6.5/Office	O
2007	O
,	O
Microsoft	O
stopped	O
licensing	O
VBA	B-Language
for	O
other	O
applications	O
.	O
</s>
<s>
Office	O
2013	O
,	O
Office	O
2016	O
,	O
Office	O
2019	O
and	O
Office	B-Application
2021	I-Application
include	O
VBA	B-Language
7.1	O
.	O
</s>
<s>
As	O
of	O
July	O
1	O
,	O
2007	O
,	O
Microsoft	O
no	O
longer	O
offers	O
VBA	B-Language
distribution	O
licenses	O
to	O
new	O
customers	O
.	O
</s>
<s>
Microsoft	O
intended	O
to	O
add	O
.NET-based	O
languages	O
to	O
the	O
current	O
version	O
of	O
VBA	B-Language
ever	O
since	O
the	O
release	O
of	O
the	O
.NET	B-Application
Framework	I-Application
,	O
of	O
which	O
versions	O
1.0	O
and	O
1.1	O
included	O
a	O
scripting	O
runtime	O
technology	O
named	O
Script	O
for	O
the	O
.NET	B-Application
Framework	I-Application
.	O
</s>
<s>
Visual	B-Application
Studio	I-Application
.NET	I-Application
2002	I-Application
and	O
2003	O
SDK	O
contained	O
a	O
separate	O
scripting	O
IDE	O
called	O
Visual	B-Application
Studio	I-Application
for	O
Applications	O
(	O
VSA	O
)	O
that	O
supported	O
VB.NET	B-Language
.	O
</s>
<s>
One	O
of	O
its	O
significant	O
features	O
was	O
that	O
the	O
interfaces	O
to	O
the	O
technology	O
were	O
available	O
via	O
Active	B-Application
Scripting	I-Application
(	O
VBScript	B-Application
and	O
JScript	B-Language
)	O
,	O
allowing	O
even	O
.NET-unaware	O
applications	O
to	O
be	O
scripted	O
via	O
.NET	B-Application
languages	O
.	O
</s>
<s>
However	O
,	O
VSA	O
was	O
deprecated	O
in	O
version	O
2.0	O
of	O
the	O
.NET	B-Application
Framework	I-Application
,	O
leaving	O
no	O
clear	O
upgrade	O
path	O
for	O
applications	O
desiring	O
Active	B-Application
Scripting	I-Application
support	O
(	O
although	O
"	O
scripts	O
"	O
can	O
be	O
created	O
in	O
C#	B-Application
,	O
VBScript	B-Application
,	O
and	O
other	O
.NET	B-Application
languages	O
,	O
which	O
can	O
be	O
compiled	B-Language
and	O
executed	O
at	O
run-time	O
via	O
libraries	B-Library
installed	O
as	O
part	O
of	O
the	O
standard	O
.NET	B-Application
runtime	O
)	O
.	O
</s>
<s>
Microsoft	O
dropped	O
VBA	B-Language
support	O
for	O
Microsoft	B-Operating_System
Office	I-Operating_System
2008	I-Operating_System
for	I-Operating_System
Mac	I-Operating_System
.	O
</s>
<s>
VBA	B-Language
was	O
restored	O
in	O
Microsoft	B-Operating_System
Office	I-Operating_System
for	I-Operating_System
Mac	I-Operating_System
2011	I-Operating_System
.	O
</s>
<s>
Microsoft	O
said	O
that	O
it	O
has	O
no	O
plan	O
to	O
remove	O
VBA	B-Language
from	O
the	O
Windows	O
version	O
of	O
Office	O
.	O
</s>
<s>
With	O
Office	B-Operating_System
2010	I-Operating_System
,	O
Microsoft	O
introduced	O
VBA7	O
,	O
which	O
contains	O
a	O
true	O
pointer	O
data	O
type	O
:	O
LongPtr	O
.	O
</s>
<s>
The	O
64-bit	O
install	O
of	O
Office	B-Operating_System
2010	I-Operating_System
does	O
not	O
support	O
common	O
controls	O
of	O
MSComCtl	O
(	O
TabStrip	O
,	O
Toolbar	O
,	O
StatusBar	O
,	O
ProgressBar	O
,	O
TreeView	O
,	O
ListViews	O
,	O
ImageList	O
,	O
Slider	O
,	O
ImageComboBox	O
)	O
or	O
MSComCt2	O
(	O
Animation	O
,	O
UpDown	O
,	O
MonthView	O
,	O
DateTimePicker	O
,	O
FlatScrollBar	O
)	O
,	O
so	O
legacy	O
32-bit	O
code	O
ported	O
to	O
64-bit	O
VBA	B-Language
code	O
that	O
depends	O
on	O
these	O
common	O
controls	O
will	O
not	O
function	O
.	O
</s>
<s>
This	O
did	O
not	O
affect	O
the	O
32-bit	O
version	O
Office	B-Operating_System
2010	I-Operating_System
.	O
</s>
