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.
- VBScript is being retired from Windows. It affects macros that run .vbs files or use VBScript regular expressions; Microsoft 365 Version 2508 added built-in RegExp to VBA.
- VBA still covers more of desktop Excel than Office Scripts. Microsoft's Office Scripts and VBA comparison says so, and notes VBA needs no special licence.
- Office Scripts is the cloud, cross-platform option, not a drop-in successor: business or education licence, no workbook events, no sign-in to external services.
- Python in Excel is for analysis, not automation. It runs in Microsoft's cloud, with no network or computer access.
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
| Phase | What happens | Timing, per Microsoft |
|---|---|---|
| 1 | VBScript is a feature on demand, preinstalled and on by default in Windows 11, version 24H2. | Now |
| 2 | Off 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) |
| 3 | Removed 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:
VBScript.RegExp— the late-bound regex object, the commonest hit by far..vbs— a script file being called, written out or copied.wscriptandcscript— the script hosts, usually inside aShellline.CreateObject(— read every hit and check what is being created. VBScript progids are the problem;Scripting.DictionaryandScripting.FileSystemObjectare not, so do not rip those out.
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:
- In the VBA editor (Alt+F11), open Tools > References and see whether Microsoft VBScript Regular Expressions 5.5 is ticked.
- Press Ctrl+F, choose Current Project, and search for
VBScript.RegExp,.vbs,wscriptandcscript. - Repeat for add-ins (.xlam) and your Personal Macro Workbook.
- 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:
| Column | What goes in it |
|---|---|
| Workbook | Full path, so the same file is not swept twice under two names |
| Owner | The person accountable for it being fixed, not the person who found it |
| Last used | Date modified, plus whether it runs monthly, quarterly or annually |
| Dependency found | Ticked reference, late-bound CreateObject, .vbs call, or none |
| Office build | The build on the PC that actually runs it, from Step 1 |
| Fix chosen | Built-in RegExp, late binding, REGEX worksheet functions, rewrite, or retire the file |
| Retested | The 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 RegExp | Office before 2508, VBScript on | Office before 2508, VBScript off | Office 2508 or later |
|---|---|---|---|
Built-in: Dim re As RegExp, no reference | No | No | Yes |
Late bound: CreateObject("VBScript.RegExp") | Yes | No | Yes |
| Reference to VBScript Regular Expressions 5.5 | Yes | No | Yes |
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:
- No workbook events. There is no equivalent of Worksheet_Change.
- Workbook only, no forms. A script cannot open files on your PC, and we found no UserForm or dialog API.
- No sign-in to external services. Microsoft's external calls page (January 2026) says there is no OAuth2 support and nowhere to store credentials, and calls fail when the script runs through Power Automate. So a script cannot be the connector for an ERP that needs OAuth sign-in.
- Quotas. The platform limits page lists 1,600 Run script calls per user per day and a 120-second timeout for synchronous Power Automate steps.
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:
- The code runs in isolated containers in the Microsoft Cloud, with no network access, no access to your computer, devices or account, and no user token.
- It returns values or images only, and cannot return or access the workbook's macros or VBA code.
- It reads data from cells in the workbook or from Power Query connections, so ERP data has to be in the workbook first, for example through Power Query or a connector (see Power Query for beginners).
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 task | Best fit | Why |
|---|---|---|
| Tidy a monthly export | VBA or Office Scripts | Both record your steps; Office Scripts if colleagues use the browser. |
| Data-entry form for journals or expense claims | VBA UserForm | The other two have no forms. See creating a data entry form in Excel. |
| Flag an entry when a cell changes | VBA | Office Scripts do not support Excel-level events. |
| Update a shared workbook each morning with Excel closed | Office Scripts with Power Automate | VBA needs desktop Excel running on a PC; Power Automate runs in the cloud. |
| Pull invoices or a trial balance from an ERP | Power Query or an ERP connector | No OAuth in Office Scripts; no network in Python in Excel. See ERP and Excel integration options. |
| Variance analysis or forecasting on a large table | Python in Excel | pandas and charts on data already in the workbook. |
| Combine every CSV in a folder on a shared drive | Power Query or VBA | Office Scripts and Python in Excel cannot reach your files. |
| Extract invoice numbers from descriptions | REGEX functions or VBA RegExp | Both built into Microsoft 365; see above. |
VBA vs Office Scripts vs Python in Excel at a glance
| VBA | Office Scripts | Python in Excel | |
|---|---|---|---|
| Language | Visual Basic for Applications | TypeScript (JavaScript also works) | Python, with libraries provided by Anaconda |
| Where it runs | Your PC, inside desktop Excel | Excel, or a Power Automate flow | Microsoft's cloud |
| Platforms | Excel for Windows and Mac; not the web | Web, Windows (Version 2210+) and Mac | Windows, Mac and web |
| Licence | Built into desktop Excel | Qualifying business or education Microsoft 365 licence plus OneDrive for Business; preview for Personal and Family | Qualifying Microsoft 365 subscription; not free or perpetual consumer licences |
| Workbook events | Yes | No | No |
| Forms and dialogs | UserForms, MsgBox, InputBox | Not in the Office Scripts API | No |
| Files on your PC | Yes | No, the workbook only | No |
| ERP and web API calls | Possible, but you write the HTTP and sign-in code | fetch inside Excel only; no OAuth | No network access |
| Runs on a schedule | Only while desktop Excel is open, for example with Application.OnTime; no cloud trigger | Yes, through Power Automate | No |
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:
- Excel for the web cannot create, run or edit VBA macros, though they stay in the file.
- Downloaded files are blocked. Since Current Channel Version 2206 (July 2022), Office for Windows blocks macros in files from the internet. See how to enable macros in Excel safely.
- VBScript is leaving Windows, which can break working macros — the reason for this page.
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.
- This month. The VBScript regex references and .vbs calls in the workbooks that run every close, plus any macro that already misbehaves (see our Excel macro not working checklist). These are the files where a failure costs a deadline rather than an afternoon.
- This quarter. The practice .xlam and every Personal.xlsb, which is the slow one because it needs a reply from each person. Then the .xltm templates, so that new engagement files stop inheriting the dependency.
- Before phase 2. Switch VBScript off on one PC, rerun a whole close on it, and sign the audit sheet off. Until somebody has done that, the sweep is a list, not a result.
- The annual files. Leave them on the sheet with the month they run written against them. They are the ones that get missed, because nothing reminds you of them until the week they are needed.
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.
- VBA. It can create standard modules, class modules and UserForms, write and replace procedures, add worksheet buttons wired to macros, add a custom ribbon tab and save as an .xlam add-in for you to install, and run macros. When it writes code with its write and replace tools, a static linter with 142 inspections undoes the write if Error-level findings appear. See the VBA macros and ribbon tutorial.
- Moving off VBScript. With your permission it can read the code in every module to find VBScript RegExp code and .vbs or wscript calls (it cannot list ticked references, so check Tools > References yourself), and rewrite RegExp code to the built-in classes. You untick the old reference yourself; the linter does not know your Office build, so run Debug > Compile VBAProject on each version your team uses. An optional test on a hidden copy of a saved workbook compile-checks a change and can run test macros, which really execute (it saves your workbook first if there are unsaved changes); it is a check, not a guarantee.
- Ledgers. Two-way connections to QuickBooks Online, Xero, Zoho Books, Odoo and FreshBooks, writing through an Excel staging sheet. Posting live, and updating, voiding or deleting records, needs a click on a confirmation card; drafts and master data such as customers and items are created without one.
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.