Sub test()
Dim strName As String
Do
strName = Application.InputBox("Enter your name:", Type:=2)
Select Case strName
Case Is = False 'cancel button is clicked
Exit Sub 'end macro
Case Is = "" 'no value entered
MsgBox "You must enter a name to continue.", vbOKOnly + vbExclamation
End Select
'loop and re-display inputbox until a value is entered
Loop Until strName <> ""
MsgBox "You entered: " & strName
End Sub