Good morning all,
I have a code that I am using to enable a UserForm to display info about employees. The user is then able to amend the data and the spreadsheet updates. I've got a search function working but I want the user to be able to search with one option OR the other option not a combination of the two.
My code is below.
Help is much appreciated.
I have a code that I am using to enable a UserForm to display info about employees. The user is then able to amend the data and the spreadsheet updates. I've got a search function working but I want the user to be able to search with one option OR the other option not a combination of the two.
My code is below.
Help is much appreciated.
Code:
Private Sub CommandButton3_Click()
row_number = 0
Do
DoEvents
row_number = row_number + 1
item_in_review = Sheets("All").Range("A" & row_number)
If item_in_review = NetworkuserSearch.Text Then
Sheets("All").Range("C" & row_number) = EmployeeIdSearch.Text
Sheets("All").Range("D" & row_number) = FullnameSearch.Text
Sheets("All").Range("B" & row_number) = Initials.Text
Sheets("All").Range("E" & row_number) = Appteam.Text
Sheets("All").Range("F" & row_number) = Deptcode.Text
Sheets("All").Range("G" & row_number) = teamcode.Text
Sheets("All").Range("H" & row_number) = Jobtitle.Text
Sheets("All").Range("I" & row_number) = emailaddress.Text
Sheets("All").Range("J" & row_number) = telephoneext.Text
Sheets("All").Range("K" & row_number) = faxext.Text
Sheets("All").Range("L" & row_number) = eventassign.Text
Sheets("All").Range("M" & row_number) = signature.Text
End If
Loop Until item_in_review = ""
If MsgBox("Are you sure you wish the submit these changes?", vbQuestion + vbYesNo) <> vbNo Then
Unload Me
Else
End If
End Sub