View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Input Box Cancel

Try code something like this... it allows only numbers in the input box and
validates for numbers less than 1...

Sub test()
Dim var As Variant

var = Application.InputBox("please enter the number of sheets.", Type:=1)

If var < 1 Then
MsgBox "Won't print"
Else
MsgBox "Print " & var & " copies"
End If

End Sub
--
HTH...

Jim Thomlinson


"Jase" wrote:

I am using an input box, when i select the cancel button on my input box it
gives me a debug. Do I need to code this button to cancel? if so how?

thanks,

Jase