Auto Change Control Names in Code

twistinginthewind

Board Regular
Joined
Jun 25, 2003
Messages
119
I quickly created a small vba userform for a project. Since this needed to be developed fast, I didn't bother to enter descriptive names for the textboxes, lables and such. This was supposed to be a one off project... well that has changed. I've been tasked with adding more and more functionality... now updating the code is quite a hendence due to the none desriptive names of the controls.

Is there an easy way to rename the controls, and have the code automatically update to the new names as well?

I figure I could rename each one, then go to the code and do a find replace, but this will take quite a while with roughly 100 controls to change. Was hoping for a better way.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,225,398
Messages
6,184,727
Members
453,254
Latest member
topeb

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