Here’s another one of those features I’ve always been amazed that in over 30+ years Microsoft never saw fit to add to the Excel VBE, the ability to copy/paste, or if you prefer, duplicate a UserForm. Seems like the type of thing that developers could find useful, no?!
Manually Duplicating an Excel UserForm
Sure, you can duplicate an Excel UserForm manually:
- Rename the UserForm to the desired new UserForm name
- Export the UserForm
- Rename the UserForm back to its original name
- Import the exported UserFrom
- Activate the imported UserForm and start development
but after a while, if you do a lot of this type of work, it can become a time suck.
Duplicating an Excel Userform Using VBA
Today, I thought I’d share a small snippet of code I created long ago to automate this task.
