Fix VBA Error 456 in Excel for Mac: Add Missing Line Continuation
Question details
The user needs to resolve VBA Error 456 Unsupported Automation Type, which occurs because a procedure declaration spanning multiple lines is missing a line-continuation character after an optional argument.

- Product
- Microsoft Excel for Mac
- Device & OS
- macOS
- Scenario
- The user is editing or running a VBA class method with a multi-line procedure declaration that contains several Optional ByVal arguments.
- Observed behavior
- Excel displays VBA Error 456: Unsupported Automation Type because the declaration is parsed incorrectly due to a missing comma and underscore after xIncomeAccount.
Open the affected macro-enabled workbook in Excel for Mac and enable the Developer tab so you can access the Visual Basic Editor. Display the procedure declaration and check where the Optional ByVal argument lines break.
Add the Missing Line-Continuation Character After xIncomeAccount
Use this when a multi-line VBA Sub or Function declaration contains several Optional ByVal arguments and Excel raises Error 456.
In VBA, a line continuation consists of a comma followed by an underscore. If the comma and underscore are omitted after an argument, the next line can be read as an Automation type that Visual Basic does not support, which triggers Error 456.
In Excel for Mac, click the Developer tab and select Visual Basic, or press Option+F11.
In the Project Explorer, open the module or class that contains Sub Init or the procedure named in the error, and scroll to its declaration.
At the end of Optional ByVal xIncomeAccount, type a comma followed by a space and an underscore: Optional ByVal xIncomeAccount, _
Ensure the next lines start with Optional ByVal xCapitalAccount, _ and Optional ByVal xCeasedDate) and that every continued line ends with an underscore.
Click Run or press F5 in the Visual Basic Editor, then execute the test macro to confirm that Error 456 no longer appears.

Use WPS Office as a Lightweight Spreadsheet Alternative for Daily Work
While VBA Error 456 must be corrected in the Excel VBA editor, WPS Office gives you a free, lightweight Microsoft Office alternative for opening and editing Excel spreadsheets with familiar tools and strong format compatibility.
- 1. Download WPS Office: Go to the official WPS Office website and click Download WPS Office Free.
- 2. Install and launch WPS Office: Open the installer, complete the setup, and launch WPS Office on your Mac.
- 3. Open your Excel workbook: In WPS Spreadsheets, click File > Open and select the workbook to continue editing sheets, charts, and formulas.

Frequently Asked Questions
Why does VBA Error 456 appear when a procedure declaration spans multiple lines?
Error 456 often appears when a continued argument line is missing the comma and underscore. VBA then parses the next line incorrectly as an unsupported Automation type.
Where exactly should I add the line-continuation character?
Add a comma followed by an underscore after Optional ByVal xIncomeAccount so the line reads: Optional ByVal xIncomeAccount, _
Is this fix the same for Excel for Mac and Excel for Windows?
Yes. The VBA line-continuation rule is identical on macOS and Windows. Use Option+F11 on Mac or Alt+F11 on Windows to open the VBA editor.
Does WPS Office automatically repair VBA Error 456?
No. WPS Office does not repair broken VBA code. It is a free spreadsheet alternative that opens Excel files, while the VBA declaration must be corrected in the macro editor.
What format should I save after fixing the macro?
Save the workbook as an Excel Macro-Enabled Workbook (.xlsm) so the corrected VBA code remains available.




