Forum Discussion

LemonPeeler's avatar
LemonPeeler
Copper Contributor
Aug 26, 2022

How do we reset a userform control name back to the default in Excel?

I apologize if this is a duplicate post, it appears the original did not post properly ...

 

We have used VBA to allow a user to change checkbox control names in an Excel userform.  Is there any way we can reset the checkbox control names back to their default names?  In a similar vein, can we reset checkbox captions back to what the default caption names were when created?

2 Replies

  • LemonPeeler 

    No, once you have changed the name and/or caption, you can't go back. Excel does not 'remember' which one was CheckBox1 and which one was CheckBox2, etc.

    • LemonPeeler's avatar
      LemonPeeler
      Copper Contributor
      Thank you, Hans, for a definitive answer. Nevertheless, we have been able to rename them using the default prefix (Check Box) and an incrementing number which simulates the default name syntax but doesn't retain the original order. If the controls had a creation time stamp it would possibly be helpful in re-creating the names, but this requirement was not of crucial importance. Thank you for clarifying the capabilities.

Resources