Hi,
I am trying to create a button that I will click and it will transfer me to another worksheet but only if a cell is populated. If the cell is not populated I want a message box to warn me and not go any further until the cell is populated. I have so far done this but it just takes me to sheet 14 with no message box. Any help will be greatly appreciated.
Sub checkIfCellIsEmpty()
If ThisWorkbook.Sheets(16).Range("R5").Value = "" Then
MsgBox "CURRENT UIN MUST BE ENTERED"
Else
Sheet14.Activate
End If
End Sub
I am trying to create a button that I will click and it will transfer me to another worksheet but only if a cell is populated. If the cell is not populated I want a message box to warn me and not go any further until the cell is populated. I have so far done this but it just takes me to sheet 14 with no message box. Any help will be greatly appreciated.
Sub checkIfCellIsEmpty()
If ThisWorkbook.Sheets(16).Range("R5").Value = "" Then
MsgBox "CURRENT UIN MUST BE ENTERED"
Else
Sheet14.Activate
End If
End Sub