VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Get the name of a control at runtime

Found on the World Wide Web  (15 Submissions)   Debugging and Error Handling   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

I've recently taken over a project from someone else, and I've been left with code that has few naming conventions and a lot of bugs. I often find myself stepping through code wanting to check the value of a field. Unfortunately, I don't know the field's name-it could be Name, UserName, NameUser, txtName, and so on. It's a real pain to stop the program, click on the control in question, press [F4], get the control name, start the program again, and return to the point in the code where I was before. Here's a handy trick to get the control name right away.
by Jeff Brown; [email protected]; Pioneering Management Corporation

Rate Get the name of a control at runtime (9(9 Vote))
Get the name of a control at runtime.bas

Get the name of a control at runtime Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters