Creating a duplicate control name causes Excel to freeze

tfurnivall

New Member
Joined
Jan 15, 2012
Messages
48
On occasion, when I am (inadvertently) creating a duplicate control name, Excel VBA freezes, and leaves me with a stern "Could not set the Name property. Ambiguous name." It then freezes - no way of cancelling the error message, no way of saving the Excel app, and no way of getting out of this situation, except by killing Excel (from Task Manager). Yes - I normally save every few minutes or so, but I'm creating a 5 * 5 array of labels to show some statistics, and got my "x" and "y" names mixed up. That's 25 sets of naming labels possibly lost.

Has anyone else ever experienced this? I think it's pretty well provokable, but I don't have the time to set up a set up an environment where I can screw up without screwing up (as it were).

Thanks for any help,

Tony
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
The ambiguous name issue is Excels self protect mechanism.
I'd suggest making a list of your control names then checking them off as you create each one.
 
Upvote 0
Michael,

Your point is well taken. However, if that is the case, why implement the 'self-protection' in such a drastic manner. Every control has a default name, and attempting to change it to a nname already in use should, perhaps, do no more than revert to the default name, with a gentle(where gentility include sarcastic messages) reminder that this name is in use.

Why is it necessary to freeze the entire application to the point that you need to use a system utility to abort the entire Excel process tree?

Tony
 
Upvote 0
Maybe so. but the "gentle" approach with VBA errors may cause more issues than it solves.!
Reverting back to a default name could also cause issues when the user tries to run a code from said control with a default name, it could run the wrong code.....and you know what could happen then.
AND
Microsoft aren't renowned for gentility, but definitely sarcasm !!!
 
Upvote 0
Touche!

I'm going to leave this open in case anyone else has actually experienced this! I'll close it in a few days.

Tony
 
Upvote 0
Rich (BB code):
 in case anyone else has actually experienced this!
We all have, at some point. and it doesn't get closed......it remains on the forum !
All part of the learning curve, I'm afraid......(y):cool:
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,970
Members
449,095
Latest member
Mr Hughes

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