VBA script for capturing all names of objects on a userform for the purpose having the capability to rename them

kbishop94

Active Member
Joined
Dec 5, 2016
Messages
476
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
WHAT I AM WANTING TO DO:

I have a userform that I use for entry purposes.

I have a second form that I use for editing the previous entries. The second form (editing form) largely mirrors the entry form, save for a few additional fields that are not present on the entry form.

I recently redesigned my entry form (pretty much completely from the ground up) and now updating the editing version of that form is going to be (somewhat) of a major task since almost all of the fields are new.

What I would like to do is take the existing entry form and duplicate it for use of the editing form (not a problem, that parts easy), but I would like to be able for all the existing objects (just the checkboxes, actually) and rename them the same name as the entry form but with a "1" at the end. Maybe there is a simpler way to do this, but what I was thinking was this: have a script capture all the object names (again, just checkboxes, if thats even possible) and then I can take those names it captured, copy-paste them into another worksheet and then I'll just add a "1" to the end of all of them. Then, run another script to append all those new names in place of the original ones on the editing form.

Is that even possible? Or.. is there another (simpler) way of executing what I have described? or, would I be better off just toggling through all of them and manually adding a "1' to each of the names as what I am trying to do would take more time than to simply go and change them all?

Thanks for any suggestions or ideas.

2a98j6c.jpg
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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