Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

Code to rename all controls of a form.

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
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

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.
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@ste5an: Note that he says "in design mode".
That's what acDesign does ;)
Avatar of bfuchs

ASKER

Thank you!
Avatar of bfuchs

ASKER

@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
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?
Avatar of bfuchs

ASKER

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