Input Box
If Response1 = vbYes Then
SaveUserName = InputBox("Enter User Name:")
if saveusername = "" then
'do what you want
else
Range("RangeUserName") = "User: " & SaveUserName
end if
End If
ps. It's probably a good habit to use & to concatenate text (and + to sum
numbers).
Steven wrote:
If I do this:
If Response1 = vbYes Then
SaveUserName = InputBox("Enter User Name:")
Range("RangeUserName") = "User: " + SaveUserName
End If
How do I catch if the Cancel button was pressed and therefore don't do
anything?
Thank you for your help.
Steven.
--
Dave Peterson
|