Visual Basic for Applications: Difference between revisions

Content deleted Content added
Reverted 1 edit by Steve-Aug2024 (talk): Rv advert
m Deleted factually incorrect information
Line 28:
 
==Design==
Code written in VBA is [[compiler|compiled]]<ref name="both">{{cite web |url=http://support.microsoft.com/kb/109382 |title=ACC: Visual/Access Basic Is Both a Compiler and an Interpreter |date=2012 |publisher=Microsoft |url-status=dead |archive-url=https://web.archive.org/web/20121021000129/http://support.microsoft.com/kb/109382 |archive-date=2012-10-21}}</ref> to [[Microsoft P-Code]] (pseudo-code), a proprietary [[intermediate language]], which the host applications ([[Microsoft Access|Access]], [[Microsoft Excel|Excel]], [[Microsoft Word|Word]], [[Microsoft Outlook|Outlook]], and [[Microsoft PowerPoint|PowerPoint]]) store as a separate [[stream (computing)|stream]] in [[COM Structured Storage]] files (e.g., <code>.doc</code> or <code>.xls</code>) independent of the document streams. The intermediate code is then executed<ref name="both"/> by a [[virtual machine]] (hosted by the host application). Despite its resemblance to many old [[BASIC]] dialects (particularly [[Microsoft BASIC]], from which it is indirectly derived), VBA is incompatible with any of them except [[Visual Basic (classic)|Visual Basic]], where source code of VBA modules and classes can be directly imported, and which shares the same library and virtual machine. Compatibility ends with Visual Basic version 6; VBA is incompatible with [[Visual Basic .NET]] (VB.NET). VBA is proprietary to Microsoft and, apart from the COM interface, is not an [[open standard]].
 
==Automation==