What is the syntax to check the value of a textbox?

If <textbox name>.Value = "<value textbox should be>" Then
   <code to be run, provided correct textbox value was entered>
End If
'example
If txtName.Value = "" Then
     Msgbox ("No name was entered!")
End If
Advertisements

What is the syntax to start a new line in text body?

Either of the three methods below will work:

Chr(10)
vbNewLine
vbCrLf
'example
MsgBox "Line 1" & vbNewLine & "Line 2" & vbCrLf & "Line 3" & Chr(10) & "Line 4"

Please note: for Textboxes in userform design, make sure to set MultiLine to true or else new lines will not work.