kr7530
Automotive
- Aug 9, 2011
- 130
I am trying to add some code to my journal that would exit the sub when the user presses "Cancel".
Below is the code, it won't get past the inputbox line when the "Cancel" button is pressed so I can't check the value.
'----------USER INPUTS---------------------------------------------------------------------------------------
Dim UserInputNumber As Double
Dim JobNumber As String
UserInputNumber = NXInputBox.GetInputNumber("Enter a 5 Digit Job Number", "Jobnumber","")
If UserInputNumber.ToString = "" Then
'user pressed cancel
Exit Sub
End If
JobNumber = UserInputNumber
'-------------------------------------------------------------------------------------------------------------
Thanks,
Kevin
NX8 Windows7
Below is the code, it won't get past the inputbox line when the "Cancel" button is pressed so I can't check the value.
'----------USER INPUTS---------------------------------------------------------------------------------------
Dim UserInputNumber As Double
Dim JobNumber As String
UserInputNumber = NXInputBox.GetInputNumber("Enter a 5 Digit Job Number", "Jobnumber","")
If UserInputNumber.ToString = "" Then
'user pressed cancel
Exit Sub
End If
JobNumber = UserInputNumber
'-------------------------------------------------------------------------------------------------------------
Thanks,
Kevin
NX8 Windows7