#1   Report Post  
Posted to microsoft.public.excel.misc
ME @ Home
 
Posts: n/a
Default cancel input

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
  #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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password redundant through use of cancel Blokeyfella Excel Discussion (Misc queries) 1 February 1st 06 05:00 PM
input box Monty Excel Discussion (Misc queries) 2 October 7th 05 08:33 AM
Input cell reference is not valid (One Variable Data Table) Dottore Excel Worksheet Functions 9 September 1st 05 03:05 PM
Input Form vba help mdalzell Excel Discussion (Misc queries) 0 April 8th 05 03:57 PM
can you input time (hh:mm:ss) without having to input the colon i. Lexicon Excel Discussion (Misc queries) 4 January 11th 05 02:09 PM


All times are GMT +1. The time now is 11:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"