First Published 14 Sept 2025 Last Updated 30 Sept 2025
Some important news was shared in a Microsoft Office blog post published on 9 Sept 2025: Prepare your VBA projects for VBScript deprecation in Windows
In May 2024, Microsoft had announced the phased deprecation of VBScript in Windows, as detailed in the official Windows IT Pro Blog. This change impacts VBA developers who rely on VBScript, particularly for reference libraries such as regular expressions. As a result, it has caused significant concerns amongst many VBA developers over the past 16 months.
However, the new blog post from 9 Sept states that:
"Starting with Office Version 2508 (Build 19127.20154) on Windows, RegExp classes are included in the VBA for Office by default. This enables the use of RegExp functions in VBA scripts without referencing external libraries. These features require Microsoft 365 version 2508 or later. (see NOTE below)
Use RegExp classes included in VBE
The default RegExp classes in VBA in Office version 2508 or later contain four types of classes to define the object type: RegExp, Match, MatchCollection, and SubMatches. There are slight differences between objects created as early binding and as late binding. For more information on early and late binding, see Early and Late Binding on Microsoft Learn.
To create a variable for RegExp object type as early binding in VBA script, no external reference to external library is needed."
NOTE:
The blog article refers first to Office version 2508 but then specifies 365 version 2508 or later. To clarify which versions are affected, I posted a thread at Access World Forums.
User feedback clearly showed that the retail versions of both Office 2016 and 2019 are also included in this change to the VBA Library. This also means that 2021 / 2024 have the same change.
In other words, all CURRENTLY SUPPORTED retail and subscription versions of Office have been updated in version 2508.
This is particularly welcome as both Office 2016 & 2019 will reach end of support on 14 Oct 2025 and will not receive any security, feature or bug updates after that date.
See the Microsoft Access blog article: End of support for Access 2016 and Access 2019 nears
So, for all Office editions listed above, from version 2508 onwards, you will see the following in the VBE Object Browser :
The result is that if all users are on Office version 2508 or later, you no longer need to manually add the vbscript.dll reference library (for early binding) or reference it (for late binding).
This news appears to resolve all the concerns that developers had about the consequent implications for RegExp when VBScript deprecation was announced in 2024.
The new blog post also includes these code snippets as examples that will work:
Early Binding Example
SubRegExpEarlyBinding()' Create a variable to hold new object.DimregExAsRegExp' Assign RegExp object to the variableSetregEx=NewRegExp' . . . add your RegExp code hereEnd Sub
Late Binding Example
SubRegExpLateBinding()DimregExAs Object' Assign RegExp object to the variableSetregEx=CreateObject("VBScript.RegExp")' . . . add your RegExp code hereEnd Sub
Further Comments
1. The changes have been designed for backwards compatibility so that no existing code will break. However the external reference is no longer required.
For late binding, you MUST continue to use CreateObject("VBScript.RegExp") even though its now using the VBA library. Presumably some kind of redirection involved.
Using either CreateObject("VBA.RegExp") or CreateObject("RegExp") will fail with error 429 (ActiveX cannot create object).
2. There have been some new RegExp related bugs reported from version 2508 onwards. These include:
a) Assertion failed error using RegExp.Replace
For more details, see:
Bug Summary - July/Aug 2025
Bugs, Features, Changes – Aug 2025
Bug Alert: Assertion Failed on RegExp Calls in Access 2508
Status: Fixed in Version 2508 Build 19127.20192 released on 2025-09-03
b) Errors using RegExp Lookahead
For more details, see:
About the Bug in VBScript.RegExp
VBA vbscript regular expressions crashes
Status: The bug has been acknowledged by Microsoft and will be fixed.
Workaround: use late binding with GetObject in place of CreateObject: GetObject("", "VBScript.RegExp")
3. At the time of writing, there has been no clear information about the future status of two other important features, FileSystemObject and the Dictionary collection, both of which are
included in the Microsoft Scripting Runtime (AKA Scripting) library: C:\Windows\System32\scrrun.dll.
Although there have been hints that both of these features will continue to work, there has as yet been no definitive statement about either of these from Microsoft.
UPDATE 30 Sept 2025:
Research carried out by members of the Access Forever team has confirmed that neither FileSystemObject nor the Dictionary object will be affected when the VBScript feature is removed
from Windows. For details, see Philipp Stiefel's article for the Access Forever blog: VBScript goes away – Our code will stay
Feedback
Please use the E-Mail button in the contact form below to let me know whether you found this article useful or if you have any questions.
Please also consider making a donation towards the costs of maintaining this website. Thank you
Colin Riddington Mendip Data Systems Last Updated 30 Sept 2025
|
Return to Access Blog Page
|
Return to Top
|