Which Excel VBA features don't work in Google Sheets
Published 25 October 2026. Checked against Google's documentation on 11 October 2026.
Google Sheets runs Apps Script, not VBA, so in one sense nothing in VBA "works". The useful question is which parts have an Apps Script equivalent and which have none. These are the ones with none, or with a replacement that works differently enough to plan for. Google's own Macro Converter documentation is the source for the Google behaviour described.
No equivalent: rebuild or replace
- UserForms and ActiveX controls. Windows dialogs and controls do not exist in a browser. Google says plainly that its converter "doesn't convert UserForms. Manually create them in Apps Script." They are rebuilt as HTML dialogs or sidebars (HTML service). In MacroBridge's scan of 1,340 macro workbooks from public GitHub repositories, 34.0% contained at least one UserForm. How a UserForm is converted.
- Windows API calls (
Declare Function ... Lib "kernel32"and the like). Apps Script runs on Google's servers, not on a Windows PC, so there is no DLL to call. - Other Office programs through COM (
CreateObject("Outlook.Application"), Word, Access). Email has a replacement (MailApp, GmailApp); driving Word or Access from the spreadsheet does not. Google's conversion guide namesCreateObject,Adodb.connection,Shell.executeandOleObjectas APIs that "typically manage critical functions like database connectivity or local system access that Apps Script cannot easily replicate". - Files and folders on the PC (
Dir,FileSystemObject,Open ... For Input,Workbooks.Open "C:\..."). A script can read and write files in Google Drive (DriveApp), never on your computer. Code that loops over a folder of files has to be redesigned around a Drive folder. - Shell and SendKeys. There is no operating system to start programs in or send keystrokes to.
- A database on your office network. The JDBC service connects to Cloud SQL, MySQL, SQL Server, Oracle and PostgreSQL, but only to a server Google can reach. An Access file or a server behind your firewall needs moving or exposing first.
- The BeforeSave event. Google: "Workarounds for the BeforeSave event aren't possible because Google Sheets automatically saves changes as you make them."
- Some named ranges. Google lists Excel Tables (a workaround exists: a named range over the table's cells) and lists of ranges (no workaround) as unsupported.
Works, but differently
- BeforeClose. No equivalent event; Google suggests a menu item or button the user clicks before closing.
- Worksheet_Change and Workbook_Open. Become the
onEditandonOpensimple triggers, which cannot send email or touch other files, stop after 30 seconds, and do not fire when a script changes a cell. - Application.OnTime. Becomes a time-driven installable trigger.
- Keyboard shortcuts. Google: import the function as a Sheets macro, which gets a Ctrl+Alt+Shift+number shortcut.
- Printing. Google's converter turns
PrintOutinto output to a PDF file, which you then print. - Long-running macros. One execution stops after 6 minutes (quotas); cell-by-cell loops that were fine in Excel need rewriting to read and write whole ranges.
- Error handling.
On Error Resume Nexthas no direct counterpart in JavaScript, whosetry/catchnever resumes at the next line.
What usually converts directly
Reading and writing cells and ranges, formulas, loops, string and date functions, sorting, formatting, adding and naming sheets, and simple dialogs. A macro made only of those is the cheap kind to convert. Most real workbooks mix both kinds, which is why a per-macro report is worth having before anyone quotes you a price.
Sources
Google's documentation, read on 11 October 2026. Google updates these pages; if one now says something different, it wins.
- Address common issues (Macro Converter)
- Convert VBA macros to Apps Script
- Fix errors in your converted code
- Simple triggers
- Installable triggers
- Quotas for Google services
- JDBC service
- HTML service
- DriveApp reference
- Google Sheets macros