Names of checkboxes on UserForm disappeared

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
275
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2011
Platform
  1. Windows
  2. MacOS
I just discovered some very strange behavior in my workbook. It's used by several people (mostly on Excel for Mac), and is passed back & forth between Excel 2019/365, Excel 2016, and Excel 2011. Most of the time, it works on all three platforms without issue. However, today a user contacted me because they were getting an error that said "Compile error in hidden module" and then said the name of one of the UserForms. The code is password protected, so no one is able to get into but me.

I unlocked the code and clicked the button to open that UserForm, and it failed on a line in the Initialize sub. The line was setting a checkbox to True. I looked at the Properties of that checkbox, and discovered that the Name was missing! Take a look at the image. You'll see on the left, next to (Name), there is nothing.

Screenshot (23).png


I can assure you, every single checkbox had a name when I released the file publicly. I seriously doubt any of my users would break the password on the file just to go into it and remove some named of checkboxes, so I'm trying to figure out how this could have happened. Anyone ever seen this kind of thing before?

By the way, this was not the only checkbox this had happened to. It was like this on 4 or 5 others -- all were on the same page of a MultiPage UserForm.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I don't have a solution for you, but I will say that I encounter the "Compile error in hidden module" message (and then the name of the problematic module/sheet, etc) fairly frequently. I use 64bit Excel and that message always comes up when I load a workbook with macros that hasn't separated out the 32-bit API declarations through conditional compilation. Could that be why the message occurred in the first place?

As for the weird userform/checkbox behaviour, I did come across a similar issue yesterday where I was opening someone's older file and(a) I got the above error message; but also (b) I got another error message where something (I can't remember what it was - worksheet? control? userform?) was using a protected name, and so Excel went ahead and renamed it. It kept on giving me this error message until I saved the doc and closed and opened it again. Judging from your screen capture, though, the userform name (OptionsUserform) shouldn't be a protected name, I think. What was the name of the checkbox?

Sorry I can't be of any help.
 
Upvote 0
I seriously doubt any of my users would break the password on the file just to go into it and remove some named of checkboxes
You can't completely delete the name of a control - the IDE won't let you - so I'd suspect your workbook has a problem, most likely caused by the round-tripping between Mac and Windows versions, I'd guess.
 
Upvote 0
Could that be why the message occurred in the first place?

I don't think so. On Windows, I run a 32-bit version of Excel, but on Mac, Excel 2019 is 64-bit. So I think I've covered my bases there.

What was the name of the checkbox?

EstimateDetailsButton_CB

Could it be an issue of the name being too long? The has been in use for over a year, and I had never seen this behavior before, so I'm guessing probably not, but if anyone knows of a character length issue with naming objects on a UserForm, let me know.
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,141
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top