makeitwork09
Technical User
I am using Excel 2007
I was wording how I could improve the following code so that if the user
selects Cancel the routine will stop and no subsequent code will execute?
Thanks
I was wording how I could improve the following code so that if the user
selects Cancel the routine will stop and no subsequent code will execute?
Code:
Sub checkInt()
Dim ValidPSA
ValidPSA = Application.InputBox(prompt:="Enter the most recent PSA",
Type:=1)
On Error Resume Next
If IsNumeric(ValidPSA) Then
'int function rounds number, if it equals the cell, then number
is an interger
If ValidPSA > 0 And ValidPSA - Int(ValidPSA) = 0 Then
Call CashflowQuery(ValidPSA)
Else
MsgBox "Not a Positive Integer: " & ValidPSA
End If
Else
MsgBox "The entry was invalid"
End If
End Sub
Thanks