A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Why does it work in Microsoft Office 365 Word? Excel developers need to contact Word developers.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear Team,
I have Microsoft 365 Personal License
I am using macOS Tahoe 26.5, Microsoft® Excel for Mac, Version 16.109.1 (26051717)
An old problem I'm running into again today. Start Excel, choose ‘Developer’, choose ‘Visual Basic’. Within Visual Basic Editor, Select ‘ThisWorkbook’, Under (General) select ‘Workbook” the following error occurs: -Variable uses an Automation type not supported in Visual Basic-
How can it be solved.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Why does it work in Microsoft Office 365 Word? Excel developers need to contact Word developers.
AI answer
This is a known issue in the Visual Basic Editor in Excel for Mac when using the event drop-downs (for example, selecting Workbook under (General) in ThisWorkbook). The editor fails to insert the event procedure and instead shows the error “Variable uses an Automation type not supported in Visual Basic.”
This cannot currently be fixed by a setting; instead, use one of these supported workarounds:
ThisWorkbook, choose the desired object (Workbook) and event from the drop-downs so that Excel generates the event procedure stub, then save the workbook and copy it back to the Mac.ThisWorkbook or the relevant sheet module. Ensure the procedure signature exactly matches the documented event (from Private Sub ... through End Sub).Private Sub ... and ending with End Sub) from trusted samples and paste it into ThisWorkbook or the sheet module, then edit the body of the procedure as needed.Once the event procedure is present in the module (created on Windows or typed/pasted manually), it runs normally on Excel for Mac despite the designer limitation.
References: