I have the below VBA code attached to a command button on a user form. The user form has two combo boxes and two text boxes. The user selects a name from combo box 5 and based on that selection, the text box called (txteuidrecord) populates with that names unique ID number that is in column "A" of each worksheet. The user selects from combo box 6 the worksheet that they want to apply this information to and then in text box "txtrecorddate", the user enters a date. Once everything has been selected and entered, the user clicks on an add button on the user form and the code selects the worksheet listed in combobox5, find the unique ID value in column "A" that's in the txteuidrecord field, and then finds the next empty cell within that row and adds the date listed in txtrecorddate. this code works great and does what I want it to do. But I need to modify it to do two more things and I am having trouble doing so.
I would like it to first check the row for that date before it adds it, and if found, do nothing and have a message box that states "Date already on file", if not found then add the date.
I then need it to also once the date has been added, to sort that row columns E through Z in order.
Bookmarks