Fix Excel VBA UserForm Control Names Disappearing
Question details
UserForm control names become blank, causing VBA code that references text boxes, list boxes, or buttons to fail.

- Product
- Microsoft Excel
- Device & OS
- Windows and Mac
- Scenario
- Editing and running an Excel workbook stored on SharePoint in a mixed operating system environment.
- Observed behavior
- The 'Name' property of various VBA UserForm controls inexplicably disappears and becomes blank, resulting in initialization errors when the macro runs.
Before making any changes to your VBA project, ensure you have a backup copy of your workbook saved locally, as corrupted UserForms can lead to further macro errors.
Recreate Controls and Restrict Form Editing to Windows
Replace the corrupted controls manually and establish a workflow where UserForms are only modified in a Windows environment to prevent future corruption.
Although Excel for Mac supports using and running VBA forms created in Windows, it does not provide an identical environment for creating or editing them. Modifying UserForms on a Mac, or synchronizing edits between Mac and Windows via SharePoint, is a common trigger for control properties becoming blank.
Open the VBA Editor (ALT + F11 on Windows), double-click your UserForm, and click through your controls (text boxes, buttons). Check the Properties window to find any controls where the '(Name)' field is blank.
Select the corrupted control and press Delete. Open the Toolbox, select the appropriate control type, and draw a new one in the same location.
In the Properties window, type the exact original name of the control into the '(Name)' field so your existing VBA code can reference it correctly.
Instruct all collaborators using Mac devices to only run the macros. Any structural edits to the UserForms or VBA code should be exclusively performed on a Windows PC.

Experience Seamless Spreadsheet Editing with WPS Office
Cross-platform VBA compatibility issues can be frustrating. If you are looking for a stable, lightweight, and highly compatible suite for your daily spreadsheet tasks, WPS Office is an excellent free alternative to Microsoft Office.
- 1. Download WPS Office: Visit the official WPS website to download and install the free suite.
- 2. Open your workbook: Launch WPS Spreadsheets and open your existing Excel files effortlessly.
- 3. Edit and collaborate: Enjoy a stable environment for data processing and macro execution.

Frequently Asked Questions
Why do VBA UserForm control names disappear on Mac?
The VBA Editor environment on Mac does not fully support the same form-editing architecture as Windows. Modifying UserForms on a Mac can corrupt the properties of the controls, causing fields like the control Name to become blank.
Can I edit Excel VBA UserForms on a Mac?
While it is possible to open the editor on a Mac, it is highly recommended to perform all UserForm creation and editing on a Windows PC to avoid property loss and corruption.
How do I recover my lost VBA control properties?
There is no automatic way to recover the lost names. You must manually delete the affected controls with blank names, recreate them from the Toolbox, and assign their original names via the Properties window.




