The VBScript Deadline: Finding Every Macro in Your Client Workbooks That Will Stop Working

Somewhere on your practice's server is a workbook from 2014 that turns a bank export into coded journal lines. It has a reference ticked to Microsoft VBScript Regular Expressions 5.5. Nobody who works there now wrote it, and nobody has opened the VBA editor in years, because it has never needed touching. When Windows switches VBScript off — Microsoft says around 2027, and the switch is a Windows setting, not an Office update — that workbook stops on a compile error against the missing library, in the middle of a close, on whichever PC happens to run it first.

The deprecation itself is documented. What nobody publishes is how a finance team sweeps an estate of it, and an estate is what a practice has. The macros are not in one place: they are in client workbooks on a shared drive, in the .xlam every manager installed four years ago, in Personal.xlsb on individual PCs, and in the .xltm template each new engagement file is started from. The team also runs more than one Office build, and the build decides which of the three regex fixes each PC can accept — which is why the fix that works on the partner's laptop can fail on the machine in reception.

This page is the sweep: the four places to look, what to search for in each, how to read the Event Viewer warning that names EXCEL.EXE, which regex code runs on which build, and a worked migration on bank descriptions. It also answers the question that arrives halfway through — while this macro is open anyway, should it move to Office Scripts or Python in Excel instead of being fixed? — with a finance-task table rather than a feature list.

Last checked: 16 September 2026, against sources we opened that day. We make HISAB 360, an AI assistant add-in for Windows desktop Excel that can read and write VBA, so it comes last, with its limits. Looking for the VBA Replace function instead? See Microsoft's Replace function reference.

The short version: nothing is replacing VBA, but one Windows setting will break some of your macros

Microsoft has not announced any retirement of VBA in Excel for Windows. What is going is VBScript, a separate Windows component that some macros lean on without anybody remembering that they do.

Where the macros actually are: the four places to sweep

A sweep fails on coverage, not on technique. Checking the workbook in front of you takes two minutes; knowing you have checked all of them is the hard part. In a practice the code sits in four places, each with a different owner and a different way of getting a list out of it.

1. Client workbooks on the shared drive. The .xlsm and .xlsb files in client folders, most of which are on nobody's register. Get the list from the file system rather than from memory: search the client root for *.xlsm, *.xlsb, *.xltm and *.xlam, then sort by date modified. Anything opened during the last two closes is in scope now. Files nobody has touched in three years still go on the list, at the bottom, because the dangerous one is always the annual job that runs in March and is remembered in March.

2. The practice add-in. There is rarely a single copy of an .xlam. It was emailed round, and each manager installed their own, so the firm now runs six versions of it and one of them is from 2019. You cannot inventory this from the server; you have to ask the people. Get each user to open File > Options > Add-ins and read out what is listed there, then collect the files themselves rather than trusting that they all match.

3. Personal.xlsb. The personal macro workbook is per-PC and invisible to everyone else, which is exactly why it is where the quick fixes live: the little routine somebody wrote to clean a bank export, which now runs every month on three clients and exists on one laptop. Nothing central will find these. Each person has to open their own, and the only way that happens is if you ask each of them by name and get an answer back.

4. The engagement templates. The .xltm files new client workbooks are started from propagate the dependency into every file created since. Fixing the template does nothing for the files already created from it, and fixing those files does nothing for the next one, so the template and its children are two separate jobs.

Put a name against each category before you start: client workbooks to the engagement manager, the add-in to whoever maintains it (which is often nobody, and that is the finding), Personal.xlsb to the individual, templates to whoever owns the firm's methodology. An unowned category is a category that does not get swept.

Step 1: list every Office build your team runs

Before you fix anything, find out what each machine is running. On each PC, File > Account > About Excel gives the version and build number. If you have IT, ask them for the inventory instead and save the walk round the office.

This single fact decides everything downstream. There are three routes to regex in VBA, set out in the compatibility matrix further down, and which of them a PC will accept depends on whether its Office build is 2508 or later. Fix a macro the modern way on a laptop running Current Channel and it will not compile for a colleague on an older build — and you will find that out during a close rather than during the sweep.

The unknowns are the perpetual and LTSC installations: Office 2019, 2021, 2024 and the LTSC channels. Microsoft's September 2025 post does not say whether those include the built-in RegExp classes, so we cannot tell you, and neither can the matrix below. Check them one at a time instead. On one of those PCs, with no VBScript reference ticked, put Dim re As RegExp in a module and run Debug > Compile VBAProject. If it compiles, that build has the classes; if it stops on "User-defined type not defined", it does not, and those machines need the late-bound route.

The timeline, and where Microsoft's own dates disagree

VBScript, the language behind .vbs files, is deprecated in Windows, not Office. Microsoft's Windows deprecated features list (updated August 2026) records the announcement as October 2023.

Is VBScript a dead language? For new work, effectively yes. Microsoft's timeline post names JavaScript and PowerShell as alternatives and recommends PowerShell for task automation. Small .vbs helpers called from macros can usually move into VBA.

The three phases

PhaseWhat happensTiming, per Microsoft
1VBScript is a feature on demand, preinstalled and on by default in Windows 11, version 24H2.Now
2Off by default; can be switched back on under Settings > System > Optional features.Around 2027, per the Windows IT Pro Blog (22 May 2024); approximately 2026 or 2027, per the Microsoft 365 Developer Blog (9 September 2025)
3Removed from future Windows releases, DLLs included. Dependent projects stop working.No date announced

The deprecated features list gives no dates. A Microsoft MVP's June 2026 community post expects the switch-off by autumn 2027, but that is not a Microsoft announcement. Plan for 2027: phase 2 breaks affected macros on any PC where nobody switches VBScript back on.

What phase 2 looks like from a desk: a macro that ran in March fails in April, with no change to the file and no change to Office. Nobody edited anything, nothing was updated, and Excel gives no hint that the cause is a Windows feature being switched off underneath it. That is the failure you are sweeping to avoid, and it will land on whoever happens to be doing the close.

What to search for, module by module

Microsoft names two patterns: VBA that runs an external .vbs script (for example through wscript.exe), and VBA that references a VBScript type library, most often Microsoft VBScript Regular Expressions 5.5. In the developer blog post's comments, its Microsoft author confirmed that Scripting.Dictionary and Scripting.FileSystemObject were not changed. VBA itself does not appear on the Windows deprecated features list.

In each project, press Ctrl+F in the VBA editor, choose Current Project, and work through this list:

Then the trap, which is the reason a search-only sweep gives false comfort: a ticked library reference produces no code hits at all. Early-bound code reads Dim re As RegExp and Set re = New RegExp, and the string "VBScript" appears nowhere in any module — only in Tools > References, which no Find reaches. Every project has to have its references looked at by eye. A project with no search hits is not a project with no dependency.

VBScript deprecation alert (Event ID 4096): what it means and how to fix it

It is an Event Viewer entry, VBScriptDeprecationAlert, Event ID 4096, whose message begins "VBScript is scheduled for deprecation" and gives the process tree and call stack of whatever used VBScript (documented in the MVP post above, not on Microsoft Learn). It is a warning, not a macro error. Windows and Office licensing scripts also use VBScript, so check the process named; if it is Excel, check your workbooks. To find entries, filter Event Viewer on Event ID 4096. Fix it by removing the dependency; clearing the event changes nothing.

Two things make this usable during a sweep. The process tree is the quick way to separate your own workbooks from Windows' and Office's housekeeping: if the tree names EXCEL.EXE, the dependency is yours to fix. And the alert only fires for code that has actually run, so a quiet Event Viewer tells you what nobody used last month. It is evidence about usage, not an all-clear for the estate — the annual workbook has raised nothing since the last time it was run.

The audit sheet: one row per workbook

For every file on the list from the four places above:

  1. In the VBA editor (Alt+F11), open Tools > References and see whether Microsoft VBScript Regular Expressions 5.5 is ticked.
  2. Press Ctrl+F, choose Current Project, and search for VBScript.RegExp, .vbs, wscript and cscript.
  3. Repeat for add-ins (.xlam) and your Personal Macro Workbook.
  4. Test on a PC with VBScript switched off, as Microsoft recommends; its detection strategies post gives IT the DISM command, to try in a test environment first.

Write it down as you go, one row per workbook, or the sweep turns into something somebody believes they finished. Seven columns are enough to hand to a partner:

ColumnWhat goes in it
WorkbookFull path, so the same file is not swept twice under two names
OwnerThe person accountable for it being fixed, not the person who found it
Last usedDate modified, plus whether it runs monthly, quarterly or annually
Dependency foundTicked reference, late-bound CreateObject, .vbs call, or none
Office buildThe build on the PC that actually runs it, from Step 1
Fix chosenBuilt-in RegExp, late binding, REGEX worksheet functions, rewrite, or retire the file
RetestedThe date it was rerun with VBScript switched off, and by whom

The last column is the one that matters. A row with a fix chosen and no retest date is a workbook that has been thought about, not a workbook that works.

VBA regex without VBScript: built-in RegExp in Microsoft 365 Version 2508

With the build list from Step 1 in front of you, this is where you decide which fix each machine can take.

From Microsoft 365 Version 2508 (Build 19127.20154) on Windows, VBA includes four regex classes, RegExp, Match, MatchCollection and SubMatches, according to the Microsoft 365 Developer Blog. Early-bound code no longer needs a library reference.

Which regex code runs where

From the post's compatibility tables and notes:

How your code gets RegExpOffice before 2508, VBScript onOffice before 2508, VBScript offOffice 2508 or later
Built-in: Dim re As RegExp, no referenceNoNoYes
Late bound: CreateObject("VBScript.RegExp")YesNoYes
Reference to VBScript Regular Expressions 5.5YesNoYes

The real risk is an Office build older than 2508 once VBScript is off. The post does not say whether perpetual or LTSC versions include built-in RegExp, so check each version your team runs (File > Account > About Excel). All on 2508 or later: use the built-in classes. Mixed team: late binding runs in as many combinations as the old reference and needs no reference to be set, so it is the simplest bridge while you upgrade.

Worked migration: pulling invoice references out of bank descriptions

This is the 2014 bank-coding macro from the top of the page, in its migrated form. It assumes a sheet named Bank with descriptions in column B from row 2. It writes references such as "inv 10452" to column C as INV-10452 (clearing C when nothing matches), and the description with repeated spaces collapsed to column D as text. On Version 2508 or later, first untick Microsoft VBScript Regular Expressions 5.5 under Tools > References, then run Debug > Compile VBAProject. If Compile reports "User-defined type not defined" on RegExp, try a Quick Repair of Microsoft 365; in the post's comments, that fixed it for one user after the author suggested reinstalling.

Option Explicit

' Built-in RegExp: Microsoft 365 Version 2508 or later on Windows.
Public Sub TagInvoiceReferences()
    Dim ws As Worksheet
    Dim reInvoice As RegExp
    Dim reSpaces As RegExp
    Dim found As MatchCollection
    Dim lastRow As Long
    Dim r As Long
    Dim txt As String

    On Error GoTo Failed
    Set ws = ThisWorkbook.Worksheets("Bank")
    lastRow = ws.Cells(ws.Rows.Count, "B").End(xlUp).Row

    Set reInvoice = New RegExp
    reInvoice.Pattern = "\bINV[- ]?(\d{4,6})\b"
    reInvoice.IgnoreCase = True

    Set reSpaces = New RegExp
    reSpaces.Pattern = "\s{2,}"
    reSpaces.Global = True

    For r = 2 To lastRow
        If Not IsError(ws.Cells(r, "B").Value) Then
            txt = CStr(ws.Cells(r, "B").Value)
            ws.Cells(r, "D").NumberFormat = "@"
            ws.Cells(r, "D").Value = reSpaces.Replace(Trim$(txt), " ")
            Set found = reInvoice.Execute(txt)
            If found.Count > 0 Then
                ws.Cells(r, "C").Value = "INV-" & found.Item(0).SubMatches(0)
            Else
                ws.Cells(r, "C").ClearContents
            End If
        End If
    Next r
    Exit Sub

Failed:
    MsgBox "Could not tag invoice references: " & Err.Description, vbExclamation
End Sub

found.Item(0).SubMatches(0) is the digits captured by the brackets in the first match. Replace with Global = True swaps every run of two or more whitespace characters for one space; the text format stops "00123" becoming a number. Microsoft's post is not a full member reference, so test existing patterns on a copy first.

Two checks before you write a retest date against this file. The pattern still has to match what this client's payers write. \bINV[- ]?(\d{4,6})\b catches INV-10452 and inv 10452 and misses 10452/INV, SI-10452 and a seven-digit reference entirely. Run it over a full month of real descriptions and count the blanks in column C against the number you expected, rather than reading the top twenty rows and calling it done — a migration that quietly stops matching one payer is worse than the compile error you were fixing. And column D has to stay text. The NumberFormat = "@" line is what keeps a reference such as 00123 from arriving as 123; if you rework the loop, keep it, and check a leading-zero row afterwards.

A late-bound version for mixed Office versions

Per Microsoft's tables, this runs on Version 2508 or later whatever the VBScript state, and on older builds while VBScript is enabled. Put it in a standard module and use =FirstMatch(B2, "INV[- ]?\d{4,6}"). Static creates the regex object once, not on every recalculation.

Option Explicit

' Returns the first match of regexPattern in sourceText, or #N/A if none.
Public Function FirstMatch(ByVal sourceText As String, ByVal regexPattern As String) As Variant
    Static re As Object
    Dim found As Object

    On Error GoTo Failed
    If re Is Nothing Then Set re = CreateObject("VBScript.RegExp")
    re.Pattern = regexPattern
    re.IgnoreCase = True
    re.Global = False

    Set found = re.Execute(sourceText)
    If found.Count > 0 Then
        FirstMatch = found.Item(0).Value
    Else
        FirstMatch = CVErr(xlErrNA)
    End If
    Exit Function

Failed:
    FirstMatch = CVErr(xlErrValue)
End Function

Regex in Excel without VBA

For a formula-only fix, Excel for Microsoft 365 has REGEXTEST, REGEXEXTRACT and REGEXREPLACE; the REGEXTEST page says all three use the PCRE2 flavour. For example, =REGEXEXTRACT(B2, "INV[- ]?\d{4,6}", 0, 1). The final 1 makes the match case-insensitive, like IgnoreCase = True; the REGEXEXTRACT page says the default is case-sensitive. Test each pattern in both places.

Fix it or move it? What Office Scripts and Python can take over

Somewhere in the sweep the question arrives: while this macro is open anyway, should it be rewritten in something newer? Sometimes. But the decider is not which language is more modern. It is whether the replacement can reach the thing the macro reaches — your files, your ledger, the event that fires when somebody types.

An Office Script cannot be your ERP connector

Office Scripts are TypeScript scripts, recorded or written in the code editor and stored in OneDrive. Where they beat VBA: browser and Mac users can run them, and a Power Automate flow can run one on a schedule with Excel closed (VBA has no Power Automate connector). The limits that settle it for a finance team:

Python in Excel cannot fetch a ledger, only reshape one

Python in Excel runs Python from a cell and returns values or charts, a real step up for analysis such as reshaping a ledger export. Microsoft's data security page sets the boundaries:

Availability. Per Microsoft's availability page, business and enterprise users get it on Windows from Current Channel Version 2408 (Build 17928.20114) and on Mac from Version 16.96. Free and perpetual consumer licences, device-based licences and shared computer activation are not supported, and the introduction page says you need internet access. Our reading, not Microsoft's: without forms, events, file access or API calls, it complements VBA rather than replacing it.

What about Python outside Excel: xlwings, openpyxl and PyXLL?

Many "VBA vs Python" searches mean Python on your PC. openpyxl is a Python library that reads and writes .xlsx and .xlsm files. xlwings, a BSD-licensed library, calls Python from Excel and Excel from Python on Windows and Mac. PyXLL is a commercial Excel add-in for writing worksheet functions and macros in Python. Usually the PC running the code needs Python and the packages installed. Microsoft's Office Add-ins (HTML, CSS, JavaScript) run on Windows, Mac, iPad and the web, but target professional developers; that page places VBA with end users.

Which tool fits which finance task?

This is the decider. For what to automate first, see Excel automation for finance teams.

Finance taskBest fitWhy
Tidy a monthly exportVBA or Office ScriptsBoth record your steps; Office Scripts if colleagues use the browser.
Data-entry form for journals or expense claimsVBA UserFormThe other two have no forms. See creating a data entry form in Excel.
Flag an entry when a cell changesVBAOffice Scripts do not support Excel-level events.
Update a shared workbook each morning with Excel closedOffice Scripts with Power AutomateVBA needs desktop Excel running on a PC; Power Automate runs in the cloud.
Pull invoices or a trial balance from an ERPPower Query or an ERP connectorNo OAuth in Office Scripts; no network in Python in Excel. See ERP and Excel integration options.
Variance analysis or forecasting on a large tablePython in Excelpandas and charts on data already in the workbook.
Combine every CSV in a folder on a shared drivePower Query or VBAOffice Scripts and Python in Excel cannot reach your files.
Extract invoice numbers from descriptionsREGEX functions or VBA RegExpBoth built into Microsoft 365; see above.

VBA vs Office Scripts vs Python in Excel at a glance

VBAOffice ScriptsPython in Excel
LanguageVisual Basic for ApplicationsTypeScript (JavaScript also works)Python, with libraries provided by Anaconda
Where it runsYour PC, inside desktop ExcelExcel, or a Power Automate flowMicrosoft's cloud
PlatformsExcel for Windows and Mac; not the webWeb, Windows (Version 2210+) and MacWindows, Mac and web
LicenceBuilt into desktop ExcelQualifying business or education Microsoft 365 licence plus OneDrive for Business; preview for Personal and FamilyQualifying Microsoft 365 subscription; not free or perpetual consumer licences
Workbook eventsYesNoNo
Forms and dialogsUserForms, MsgBox, InputBoxNot in the Office Scripts APINo
Files on your PCYesNo, the workbook onlyNo
ERP and web API callsPossible, but you write the HTTP and sign-in codefetch inside Excel only; no OAuthNo network access
Runs on a scheduleOnly while desktop Excel is open, for example with Application.OnTime; no cloud triggerYes, through Power AutomateNo

Is VBA dead? Is it still used in 2026?

No — and the sweep above is why the question keeps coming back: something real is changing, but it is not VBA. Microsoft's comparison positions VBA for desktop solutions and Office Scripts for cross-platform, cloud-based ones. That 2023 page is positioning, not a promise; we found no Microsoft statement guaranteeing VBA indefinitely, or retiring it. In finance it remains the practical choice for checking entries as they are typed, data-entry forms and combining files from a network drive. New to macros? Start with what a macro in Excel is. Three changes explain the "VBA is dead" talk:

What to fix before the next close, and what can wait

Not wholesale migration: move only the jobs the task table gives to Office Scripts or Python. Everything else is a dated plan run against the audit sheet.

For ledger data, a connector usually beats all three scripting tools; see connecting QuickBooks and Xero to Excel.

How HISAB 360 fits: AI help with VBA in desktop Excel

HISAB 360 is an AI assistant add-in for Windows desktop Excel whose AI can read and write the VBA in macro-enabled workbooks. Against a sweep, be clear about which half of the job that is: it works on one open workbook at a time, so it cannot scan a folder of client files, cannot list the references ticked in a project, and cannot inventory your Office builds. Finding the work is a manual or IT job. HISAB helps with the rewrite once a workbook is open in front of it.

The limits: Windows desktop Excel only. Most macro tools are off by default: to edit code you switch on HISAB's Edit and Run macro permissions, tick Excel's Trust access to the VBA project object model, and use a macro-enabled file (.xlsm, .xlsb, .xlam or .xltm). The linter is not the VBA compiler and does not fix code itself. Apart from undoing a write the linter rejects, there is no automatic rollback, so export modules before large edits. There is no supported VBA API for posting to an ERP. Not for: teams working mainly in the browser or on Mac, or automation that must run in the cloud with Excel closed.

Frequently asked questions

How do I find every workbook that uses VBScript?

No single search finds them, because a ticked reference to Microsoft VBScript Regular Expressions 5.5 leaves no trace in the code. Sweep four places: client workbooks on the shared drive, the practice .xlam, each PC's Personal.xlsb and the .xltm templates. In each project search the code for VBScript.RegExp, .vbs, wscript and cscript, and then check Tools, References by eye. Event Viewer entries for Event ID 4096 only show code that has already run, so they are a usage sample rather than a complete list.

Will my macros stop working overnight?

No. Phase 2 makes VBScript off by default in Windows, and it can be switched back on per PC under Settings, System, Optional features, so an affected macro can be brought back while you fix it. Phase 3 removes the component from Windows, including the DLLs, and has no announced date. That is the one with no way back, which is why the fix belongs on this year's plan rather than the deadline's.

Is VBA being deprecated?

No. Microsoft has not announced any retirement of VBA in Excel for Windows, and its documentation still describes VBA as the desktop option with more complete Excel coverage than Office Scripts. What is deprecated is VBScript, a separate Windows component, which affects VBA only where macros run .vbs files or use VBScript regular expressions.

Is VBA still relevant in 2026?

Yes, for automation inside desktop Excel. Of Microsoft's three options, only VBA offers workbook events, UserForms and access to files on your PC, and it needs no special licence. Office Scripts suits browser users and Power Automate schedules; Python in Excel suits cloud analysis. Many teams use VBA alongside one or both.

Is VBScript scheduled to be deprecated?

It already is. Microsoft announced it in October 2023. In Windows 11, version 24H2, VBScript is an optional feature, on by default. Microsoft says it will be off by default around 2027 (a September 2025 Microsoft post says approximately 2026 or 2027) and later removed; no removal date is announced.

What is replacing VBScript?

Microsoft points to PowerShell and JavaScript. For VBA users, the most common dependency is regular expressions: Microsoft 365 Version 2508 (Build 19127.20154) added built-in RegExp, Match, MatchCollection and SubMatches classes to VBA, so early-bound regex code no longer needs the VBScript library. Small .vbs helpers can usually move into VBA.

How do I use regex in VBA without the VBScript reference?

On Microsoft 365 Version 2508 or later for Windows, untick Microsoft VBScript Regular Expressions 5.5 under Tools, References, declare Dim re As RegExp and Set re = New RegExp, then set Pattern, IgnoreCase and Global and call Execute, Test or Replace. On older builds, CreateObject("VBScript.RegExp") works while VBScript is enabled in Windows.

Can Office Scripts replace VBA?

For some jobs. Office Scripts run in Excel for the web, Windows and Mac and work with Power Automate. But they cannot respond to workbook events, show forms, reach files outside the workbook or sign in with OAuth, and need a business or education Microsoft 365 licence. Macros relying on those should stay in VBA.

Which is harder, VBA or Python?

For small tasks the languages are similarly approachable; the environment differs. VBA is built into desktop Excel, and the macro recorder writes starter code. Python in Excel needs a qualifying Microsoft 365 plan and returns results only to cells; Python on your PC needs installing. Python pays off for heavy analysis, VBA for automating a workbook.

Try HISAB 360 on your own workbook

HISAB 360 is an AI assistant inside Windows desktop Excel for accountants and finance teams. It connects two-way to QuickBooks, Xero, Zoho Books, Odoo and FreshBooks. The 15-day trial is the full product, no card required.

Start free → See pricing