I am trying to have a message box show when a user fails to fill in a required text box in a user form, however the box does not pop up and I am getting no error messages as to an incorrect code. Here is what I'm using:

Private Sub TextBox2_LostFocus()
    If TextBox2.Value = vbNullString Then
         'TextBox2.Value is empty then show msgbox
         MsgBox "TextBox2 value is required.", vbCritical, "Required Value"
         TextBox2.Activate
       Else
        TextBox2.Value = TextBox2.Text

    End If
End Sub
Thanks for any feedback!
Bernadette