LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default inputbox

who do i get the sub to not continue if the cancel button
is hit?

Do 'loop until proper number
entered
Check = True

If Range("d15") = "" Then
MyValue1 = InputBox(Message1, Title1, Default)
Range("m45") = MyValue1
End If

If MyValue1 = vbCancel Then ???? 'want it to end here :)

If Not (MyValue1 = 0 And MyValue1 < 50) Then
MyValue1 = 7
Range("m45") = MyValue1
MyValue3 = MsgBox("Enter value between 0 and 50",
vbOKOnly, "Invalid Number Entered")
Else
Check = False
If Range("d15") = "" Then MyValue2 = MsgBox(Message2,
Style, Title2)
End If

Loop Until Check = False
 
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
InputBox Help Mark[_8_] Excel Discussion (Misc queries) 2 November 24th 08 11:07 PM
InputBox with VBA Mark[_8_] Excel Discussion (Misc queries) 0 November 24th 08 12:39 AM
InputBox peyman Excel Discussion (Misc queries) 4 September 28th 07 04:53 PM
InputBox GeorgeJ Excel Discussion (Misc queries) 5 July 12th 07 01:20 AM
inputbox brownti via OfficeKB.com Excel Discussion (Misc queries) 2 February 9th 07 02:37 PM


All times are GMT +1. The time now is 06:26 AM.

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

About Us

"It's about Microsoft Excel"