How to make a variable for column locations for userform

Copper Contributor

I am creating a userform where the user can:

Create a new line in a database

Update an existing line in a database

View existing lines in a database

 

I have about 50 places (textbox, combobox etc) in the userform that require inputs. Each input relates to a specific column in the database.

How can I predefine these to reduce my code and just tell each Private Sub to update as per "predefined variable"?

i.e. I don't want to write out 50 lines per Private Sub saying the same locations

 

Thank you very much!

0 Replies