Content deleted Content added
Adfontes18 (talk | contribs) m →Origins |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2:
{{Infobox programming language
| logo = Microsoft Visual Basic for Applications logo.svg
| logo_size = 200px
| paradigm = [[Multi-paradigm programming language|Multi-paradigm]]
| year = {{Start date and age|1993}}
Line 58 ⟶ 59:
As with any common programming language, VBA macros can be created with malicious intent. Using VBA, most of the [[computer security|security]] features lie in the hands of the user, not the author. The VBA host application options are accessible to the user. The user who runs any document containing VBA macros can preset the software with user preferences. [[End-user (computer science)|End-user]]s can protect themselves from attack by disabling macros from running in an application or by granting permission for a document to run VBA code only if they are sure that the source of the document can be trusted.
In February 2022, Microsoft announced its plan to block VBA macros in files downloaded from the Internet by default in a variety of Office apps due to their widespread use to spread malware.<ref>{{Cite web |title=Microsoft to Block Office VBA Macros by Default |url=https://www.theverge.com/2022/2/7/22922032/microsoft-block-office-vba-macros-default-change |access-date=2022-09-26 |website=The Verge |date=7 February 2022 |language=en-US}}</ref>
=== Macro risks ===
Line 163 ⟶ 164:
As of July 1, 2007, Microsoft no longer offers VBA distribution licenses to new customers. Microsoft intended to add .NET-based languages to the current version of VBA ever since the release of the [[.NET Framework]],<ref>{{cite web|url=http://blogs.thinktecture.com/cnagel/archive/2005/09/14/414225.aspx|title=Visual Studio for Applications|url-status=dead|archive-url=https://web.archive.org/web/20071217064436/http://blogs.thinktecture.com/cnagel/archive/2005/09/14/414225.aspx|archive-date=2007-12-17}}</ref> of which versions 1.0 and 1.1 included a scripting runtime technology named ''Script for the .NET Framework''.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/ms974548.aspx|title=Introducing Visual Studio for Applications|website=msdn.microsoft.com}}</ref> Visual Studio .NET 2002 and 2003 SDK contained a separate scripting IDE called ''Visual Studio for Applications'' (VSA) that supported VB.NET.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/ms974577.aspx|title=Script Happens .NET|website=msdn.microsoft.com}}</ref><ref>{{cite web|url=http://redmondmag.com/news/article.asp?EditorialsID=126|title=Microsoft Takes Wraps Off VSA Development Technology|url-status=dead|archive-url=https://web.archive.org/web/20071217062427/http://redmondmag.com/news/article.asp?EditorialsID=126|archive-date=2007-12-17}}</ref><ref name="VSA">{{cite web|url=http://www.codeproject.com/csharp/vsascripting.asp|title=VSA scripting in .NET|url-status=dead|archive-url=https://web.archive.org/web/20070211180713/http://www.codeproject.com/csharp/VsaScripting.asp|archive-date=2007-02-11}}</ref> One of its significant features was that the interfaces to the technology were available via [[Active Scripting]] ([[VBScript]] and [[JScript]]), allowing even .NET-unaware applications to be scripted via .NET languages. However, VSA was deprecated in version 2.0 of the .NET Framework,<ref name="VSA" /> leaving no clear upgrade path for applications desiring Active Scripting support (although "scripts" can be created in [[C Sharp (programming language)|C#]], [[VBScript]], and other .NET languages, which can be [[compiler|compiled]] and executed at run-time via [[library (computing)|libraries]] installed as part of the standard .NET runtime).
Microsoft dropped VBA support for [[Microsoft Office 2008 for Mac]].<ref>{{cite web|url=http://www.macworld.com/news/2006/08/07/msuniversal/index.php|date=2006-08-07|work=[[Macworld]]|title=WWDC: Microsoft updates Universal status of Mac apps|access-date=2007-05-25|archive-date=2008-07-19|archive-url=https://web.archive.org/web/20080719162641/http://www.macworld.com/news/2006/08/07/msuniversal/index.php|url-status=dead}}</ref><ref>{{cite web|url=https://products.office.com/en-us/microsoft-office-for-home-and-school-faq|title=What is Microsoft Office and Office 365 – FAQs}}</ref> VBA was restored in [[Microsoft Office for Mac 2011]]. Microsoft said that it has no plan to remove VBA from the Windows version of Office.<ref>{{cite web|url=https://blogs.msdn.microsoft.com/vsto/2008/01/16/the-reports-of-vbas-demise-have-been-greatly-exaggerated|title=The Reports of VBA's Demise Have Been Greatly Exaggerated}}</ref><ref>{{cite web |title=Clarification on VBA Support |url=http://blogs.msdn.com/excel/archive/2008/01/16/clarification-on-vba-support.aspx |url-status=dead |archive-url=https://web.archive.org/web/20080411025937/http://blogs.msdn.com/excel/archive/2008/01/16/clarification-on-vba-support.aspx |archive-date=2008-04-11}}</ref>
With [[Office 2010]], Microsoft introduced VBA7, which contains a true pointer data type: LongPtr. This allows referencing 64-bit address space. The 64-bit install of Office 2010 does not support common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews, ImageList, Slider, ImageComboBox) or MSComCt2 (Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar), so legacy 32-bit code ported to 64-bit VBA code that depends on these common controls will not function. This did not affect the 32-bit version Office 2010.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/ee691831.aspx|title=Compatibility Between the 32-bit and 64-bit Versions of Office 2010|website=msdn.microsoft.com}}</ref> Microsoft eventually released a 64-bit version of MSComCtl with the July 27th, 2017 update to Office 2016.<ref>{{cite web|url=https://learn.microsoft.com/en-us/officeupdates/monthly-channel-2017#version-1707-july-27|title=Release notes for Monthly Channel releases in 2017|website=learn.microsoft.com|access-date=2022-11-13}}</ref>
|