I am making a call to a VBScript called Validate.vbs. There is a Function within this script that is called validateNumeric(strValue). I keep getting a Type mismatch: 'validateNumeric'
here is my code..
If Form.purchaseprice1.value = "" Then 'If Null then Nothing Else Check
Else
Dim strValue
strValue = (Form.purchaseprice1.value)
intcheck = Sgn(Form.purchaseprice1.value)'Checking that Num is Positive
If intcheck = 1 Then
Dim intValue
intValue =(Form.purchaseprice1.value) 'Checking Length
msgBox intValue
If validateNumeric(intValue) Then
msgBox "Yes Boyeeee!"
End If
End If
End If
And here is my function...
function validateNumeric(strValue )
Set re = New RegExp
With re
'.Pattern = "(^-?\d\d*$)(\d{10})\.\d{1,2}$)"
.Pattern = "\d{10}"
.IgnoreCase = True
.Global = True
End With
'Boolean expressionmatch
expressionmatch = re.Test(strValue)
validateNumeric = expressionmatch
end function
If anyone can offer some advice i would appreciate it...It's not that value strValue being passed I know that to be a fact..I think it's the way I am calling the function which I have done before but now it is erroring out...
here is my code..
If Form.purchaseprice1.value = "" Then 'If Null then Nothing Else Check
Else
Dim strValue
strValue = (Form.purchaseprice1.value)
intcheck = Sgn(Form.purchaseprice1.value)'Checking that Num is Positive
If intcheck = 1 Then
Dim intValue
intValue =(Form.purchaseprice1.value) 'Checking Length
msgBox intValue
If validateNumeric(intValue) Then
msgBox "Yes Boyeeee!"
End If
End If
End If
And here is my function...
function validateNumeric(strValue )
Set re = New RegExp
With re
'.Pattern = "(^-?\d\d*$)(\d{10})\.\d{1,2}$)"
.Pattern = "\d{10}"
.IgnoreCase = True
.Global = True
End With
'Boolean expressionmatch
expressionmatch = re.Test(strValue)
validateNumeric = expressionmatch
end function
If anyone can offer some advice i would appreciate it...It's not that value strValue being passed I know that to be a fact..I think it's the way I am calling the function which I have done before but now it is erroring out...