Detected Version
Office:mac 2016 version 16.14 (180507)
Issue
When resetting the Error Trapping mode in the VBE Options dialog to Break on Unhandled Errors the setting is not saved and the option button is not activated.
Steps to Reproduce
- Start any Office:2016 application e.g. PowerPoint, Excel, Word
- From the menu bar at the top of the display, click Tools / Macro / Visual Basic Editor
- Form the main menu bar (no in VBE mode) click [App Name] / Preferences to open the VBE Options dialog
- Click the General tab
- In the Error Trapping section, select either the Break on All Errors or Break in Class Module option
- Clicking the Break on Unhandled Errors option fails to set the choice hence it cannot be saved
Cause
The problem is related to the Visual Basic plist file whereby the required XML elements are not being added for the third error handling option.
Workaround
To set the error trapping mode to the third Break on Unhandled Errors option, follow these steps:
- Close all Office:mac applications
- Open Finder
- With the alt key pressed, click Go and select Library
- Navigate to Group Containers / U8F8T346G9.Office / Profile Settings
- Open the com.microsoft.visualbasic.plist file in a text editor
- Locate this section which appears near the top of the file in the <key>7.1\Common</key> element:
<key>BreakOnAllErrors</key> <string>1</string> <key>BreakOnServerErrors</key> <string>0</string>
- Replace the above 4 lines with these 6 lines:
<key>BreakOnAllErrors</key> <string>0</string> <key>BreakOnServerErrors</key> <string>0</string> <key>BreakOnUnhandledErrors</key> <string>1</string>
- Save and Close the file
- Open the desired Office:mac 2016 application and confirm the Error Trapping has been set to Break on Unhandled Error
This is a workaround for this answers.microsoft.com question.