I'm trying to make my VBA code less cryptic and easier to debug by renaming my control items with unique names that make sense. For example, instead of "Textbox1" use "FirstName". Unfortunately, I lose the convenience of using loops to automate certain processes (like the code below).
Is there a solution where I could use unique names for my controls and still be able to loop through them?
I thought I could create a table with all the names of my control items and just loop through that list...but I wanted to see if there was a better option first.
Thanks!
VBA Code:
'Clear all entries
For i = 1 To 83
Controls("Textbox" & i).Value = ""
Next i
Is there a solution where I could use unique names for my controls and still be able to loop through them?
I thought I could create a table with all the names of my control items and just loop through that list...but I wanted to see if there was a better option first.
Thanks!