We help IT Professionals succeed at work.

Code to rename all controls of a form.

bfuchs
bfuchs asked
on
69 Views
Last Modified: 2019-01-16
Hi Experts,
Looking for code that will open a form in design mode, loop thru all controls and change their name to "txt" &  their control source.
Thanks
Comment
Watch Question

Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Unless you want to write an add-in or find on on the web that does it, you can't run code in design mode.
Senior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
@ste5an: Note that he says "in design mode".
ste5anSenior Developer
CERTIFIED EXPERT

Commented:
That's what acDesign does ;)
CERTIFIED EXPERT

Author

Commented:
Thank you!
CERTIFIED EXPERT

Author

Commented:
@Martin,
Is this a question about Classic Visual Basic which is VB6 or Access?
I happened to use Access but doesn't the same question/answer applied to VB as well (except for Access.TextBox)?
The reason I include that in the topic is that I can get VB folks look into as well. (By now if you feel like removing is ok with me:)
Thanks,
Ben
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
That's for you to decide, but I can say that Classic Visual Basic is an outdated (sniff) language which is stand-alone and can no be used inside any Office product including Access, Excel, Word and Visio). On the other hand VBA which is very similar to VB6 can be, so would you like me to add that topic?
CERTIFIED EXPERT

Author

Commented:
but I can say that Classic Visual Basic is an outdated
Well under VB Classic there are 164K users assigned, while for VBA I see only 11K, guess by selecting VB I get more attention...
so would you like me to add that topic?
It doesnt matter as the issue has been resolved.
Thanks,
Ben

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions