I have a macro-enabled workbook used by around 100 people, most of them on Mac. One user is having a problem that I have never heard of before, and have never run across in my testing.
In the Workbook_Open sub, I have some userforms loading and showing under certain conditions.
After those userforms are closed (if they are ever open), I have code to make sure they are unloaded, just in case they weren't unloaded when they were first supposed to be. This code runs every time; it doesn't track whether the userform was every loaded or not.
So far, this has worked fine on every computer that has used it (as far as I know).
However, I heard from a user today who is getting Run-time error 6: Overflow on the line Unload UserForm1. In his case, UserForm1 is never loaded. UserForm1 is definitely a userform within the file.
Since it has never caused an error before, I assumed there was no problem attempting to unload a userform that was not currently loaded.
This user is on a Mac, using BigSur and Excel 16.16.27. (He has the retail version of Excel 2016.) He also has two monitors on his computer, in case that matters. Oddly enough, he also has a Mac laptop and he tried it on that, and the file worked fine on it.
Anyone have any thoughts as to why the Overflow error might be occurring?
In the Workbook_Open sub, I have some userforms loading and showing under certain conditions.
After those userforms are closed (if they are ever open), I have code to make sure they are unloaded, just in case they weren't unloaded when they were first supposed to be. This code runs every time; it doesn't track whether the userform was every loaded or not.
VBA Code:
Unload UserForm1
Unload UserForm2
So far, this has worked fine on every computer that has used it (as far as I know).
However, I heard from a user today who is getting Run-time error 6: Overflow on the line Unload UserForm1. In his case, UserForm1 is never loaded. UserForm1 is definitely a userform within the file.
Since it has never caused an error before, I assumed there was no problem attempting to unload a userform that was not currently loaded.
This user is on a Mac, using BigSur and Excel 16.16.27. (He has the retail version of Excel 2016.) He also has two monitors on his computer, in case that matters. Oddly enough, he also has a Mac laptop and he tried it on that, and the file worked fine on it.
Anyone have any thoughts as to why the Overflow error might be occurring?