I want to make a few user forms which have near identical properties (size, text boxes, buttons, images, etc) but there's no option to copy/paste the user form in the VBA editor. How do I make these copies?
I want to make a few user forms which have near identical properties (size, text boxes, buttons, images, etc) but there's no option to copy/paste the user form in the VBA editor. How do I make these copies?
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
not sure if it can be done... What I have done in the past was
1- open 2 different instances of excel (and the VBA explorer)
2- move the UserForm to the second excel (drag and drop), this will make a copy of it in the new excel file
3- change the name and then drag it back..
repeat step 3 as often as needed.
Can't you just use the same userform?
Failing that, export the form (right click > export), then re-import
Thanks, opening up two instances worked. The two forms will be different enough that I don't want to code hiding buttons and such. I tried exporting and importing but it gave me an error.
Thanks!
Hi ChemistB
Kyle's approach is right on except, after you've exported the UserForm and BEFORE you re-import it, change the Name of the UserForm in the Workbook. The Import will not work if the UserForm already exists in the Workbook.
So, if the Name of the UserForm is myForm:
- Export myForm
- Change the Name of myForm to myForm1 (in the Workbook)
- Import myForm
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Thanks John. That works.
You're welcome...glad I could help. Thanks for the Rep.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks