Thread: cancel input
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default cancel input

Dim reg As String
Range(locatereg).Select

reg = InputBox("Confirm Registration Number For " & _
Range(locatetrunk) & vbNewLine & vbNewLine, _
"Reg", Range(locatereg))

If reg < "" Then
...


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"ME @ Home" wrote in message
...
have the following line of code

Dim reg As String
Range(locatereg).Select

reg = InputBox("Confirm Registration Number For " & Range(locatetrunk) &
Chr$(13) & Chr$(13), "Reg", Range(locatereg))

how do i get the imput box to exit the sub if cancel is pressed,, as it

does
if using msgbox