Hi,
This is my first post and I'm a complete novice.
I'm looking for help with the code I'm writing and I'm sure there's a way to streamline it but I don't know how.
I have an if statement that checks specific textboxes in a userform (in the example below, the textbox names are "OneBedOneBNum" and "OneBedOneBArea") and depending on if they contain data or not, a message box is displayed or the data is transferred to a worksheet.
Is there a way I can loop this code so that after running for the "OneBedOneBNum" and "OneBedOneBArea" textboxes, they're replaced with a list of other textboxes in the userform with names "TwoBedOneBNum" and "TwoBedOneBArea", "ThreeBedOneBNum" and "ThreeBedOneBArea" etc.?
Would I have to change the textbox names to do this, or can I list them out for iterative replacement in the code?
I only have 13 textboxes to do this with but I feel like learning how to do the best way other than tedious copy and pasting and writing out all the names will be beneficial in the future.
Below is the code I'm talking about (note that "Accom" and "Htg" are the worksheet names):
Many thanks,Please Login or Register to view this content.
Jack
Bookmarks