RegExp Added to VBA Library with Office Version 2508 (1 Viewer)

isladogs

MVP / VIP
Local time
Today, 21:20
Joined
Jan 14, 2017
Messages
19,239
In May 2024, Microsoft announced the planned deprecation of VBScript at some future date. This change impacts VBA developers who rely on VBScript, particularly for reference libraries such as regular expressions. As a result, it has caused significant concern amongst many VBA developers.

However, 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

"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.

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."


With M365 Version 2508 Build 19127.20154 onwards, you will see the following in the VBE Object Browser:

RegExp in VBA library


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 solve the justifiable ccncerns that people had about the consequent implications for RegExp when VBScript deprecation was announced in 2024.

I have written a draft article about this news:

Before I publish it, I'm hoping to get clarification about whether this also apples to perpetual licensed retail (non-LTSC) versions of Office from 2016 onwards
If you have Office 2016/2019/2021/2024 on Current Channel 2508, please could you check the VBA library as in the screenshot above and let me know whether this also applies to you
 
Thanks. That’s what I hoped to see.
So 2021 and 2024 should also be fine.

Anyone able to test using 2016?
 
Perfect. Thanks
I've updated and published the article with that information
 
Last edited:
That's a great relief to those of us who use RegExp all the time. And thanks for the thread as I'm sure I'd never have noticed.:)
 
I'm on 2021 Pro and CANNOT see RegExp in my list. Goes from ReflectionFormat to Relation with nothing in between.

ADDENDUM: LTSC 2021 Pro Plus, and when I do an Object Explorer search for RegExp it says Not found. When I go to File >> Account and try to force manual updates, it says I AM up to date.

1757889884769.png
 
Last edited:
I also have 2021 Pro LTSC for which the latest version is 2108 (Build 14334.20296)
LTSC are volume licensed versions - not retail - and do not receive regular feature updates

The latest retail version for 2021 is Version 2508 (Build 19127.20222)

 
Now that’s interesting and also unexpected. 👍
From the screenshot, that is 2024 LTSC but its getting updates as if it were a retail version.

According to the MS website, the latest version of 2024 LTSC is 2408 (Build 17932.20540).

 
Last edited:
I thought the other computer I had access to would be 2021/2024, but it's now

Microsoft 365 Apps For Business Version 2508 (Build 19127.20222) in Current Channel.

It is fully patched and interestingly does not have "RegExp" in "VBA".
 
I thought the other computer I had access to would be 2021/2024, but it's now

Microsoft 365 Apps For Business Version 2508 (Build 19127.20222) in Current Channel.

It is fully patched and interestingly does not have "RegExp" in "VBA".

That's also surprising! I have the E5 Enterprise edition of 365 and that does include RegExp in VBA
 
I could test another one, exactly the same version as @theDBguy has:
Microsoft Office Professional Plus 2016 Version 2508 (Build 19127.20222)

One more information from my side: It is a 32-bit Access.

'RegExp' is available in 'VBA'.
 
I don’t believe bitness is relevant.
I have tested in both bitnesses and RegExp is present in both cases.
 
For what little it is worth, my version of Office (21 Pro Plus) is 32-bit.
 

Users who are viewing this thread

Back
Top Bottom