I have some code which prompts users to fill in all the required fields in an excel worksheet before a copy of the sheet is created. I want to add something into the code to also prompt users to select a reason if they have entered a value of 'No' in a previous cell. I have done some googling but to be perfectly honest I'm not entirely sure what I should be googling for!
This is the current code;
I want to add a further ElseIf in that comes up with the message to prompt the user to select the reason code if the previous cell has been given a value of 'No'. I'm assuming this would be defined in the same way as the IsEmpty part of the code but I have no idea what to put. I tried 'ElseIf IsNo' but that didn't work.
Any guidance would be greatly appreciated!
This is the current code;
Code:
Sub CreateAgentCopy()
If IsEmpty(Cells(3, 3)) Then
MsgBox "You must complete Agent Name"
ElseIf IsEmpty(Cells(4, 3)) Then
MsgBox "You must complete Team Leader name"
ElseIf IsEmpty(Cells(5, 3)) Then
MsgBox "You must complete Call Date"
I want to add a further ElseIf in that comes up with the message to prompt the user to select the reason code if the previous cell has been given a value of 'No'. I'm assuming this would be defined in the same way as the IsEmpty part of the code but I have no idea what to put. I tried 'ElseIf IsNo' but that didn't work.
Any guidance would be greatly appreciated!