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: 852
Default Cancel Input Box error

With the OK and CANCEL options, I tried all the commented out exit codes for the Input Box and all produce an error on this line:

sNum = InputBox("Stock Number Required.", "Quantidade Retirada")

Otherwise the box and code work okay.

Howard


myIB2:
sNum = InputBox("Stock Number Required.", "Quantidade Retirada")
' If sNum = vbNullString Then
' MsgBox ("User canceled!")
' End If
'If sNum = vbNullString Then Exit Sub
'If sNum = "" Then Exit Sub
'If sNum = 0 Then Exit Sub

If sNum rngFnd.Offset(, 6) Then
MsgBox "Stock Actual is: " & rngFnd.Offset(, 6) & _
" You are requesting: " & sNum & vbCr & vbCr & _
" Stock Minimo is: " & rngFnd.Offset(, 5)

Sheets("Saídas").Range("F10").ClearContents
GoTo myIB2
'Exit Sub
Else
'/ Continue code
Sheets("Saídas").Range("F10") = sNum
rngFnd.Offset(, 6) = rngFnd.Offset(, 6) - sNum
rngFnd.Offset(, 6).Copy Sheets("Saídas").Range("J10")
End If
 
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
Input Box Vs Cancel Ardy Excel Programming 6 September 6th 07 07:44 AM
Input Box - Hit cancel Steven Excel Programming 5 October 10th 06 04:23 PM
Input box to cancel sub when Cancel is clicked. PCLIVE Excel Programming 5 September 5th 06 03:19 PM
Input box cancel Little Penny Excel Programming 1 August 25th 06 11:50 PM
Input box cancel produces error pkeegs Excel Programming 5 April 12th 06 06:05 AM


All times are GMT +1. The time now is 08:23 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"