Saludos, aqui te muestro un ejemplo de
vbnet.mvps.org:
Código vb:
Ver originalPrivate Sub Command1_Click()
Dim sInput As String
sInput = InputBox("Go ahead ... abuse me", _
"Dreaded InputBox Demo", _
"Some default text goes here")
If StrPtr(sInput) = 0 Then
MsgBox "Cancel was pressed"
Else
If Len(sInput) = 0 Then
MsgBox "OK pressed but nothing entered."
Else
MsgBox "OK pressed: value= " & sInput
End If 'Len(sInput)
End If 'StrPtr
End Sub
Como puedes ver aqui te muestra claramente como diferenciar si el usuario le dio cancel o simplemente no ingreso nada en el InputBox.
Espero que te sea de utilidad