calling a module

JaredNJames

Registered User.
Local time
Today, 05:58
Joined
Jul 7, 2007
Messages
87
hi i have the following code, how do i 'call' it so that it runs to check the value?

'***************** Code Start ***************
Function nnz(testvalue As Variant) As Variant
'Not Numeric return zero
If Not (IsNumeric(testvalue)) Then
nnz = 0
Else
nnz = testvalue
End If
End Function
'***************** Code End ****************
 
Issue a CALL statement with the specified variable:
Code:
CALL nnz(Your VARIANT value input)
That will run it.
 
hi, where exactly would i place that? and what is my variant?
 
hi, where exactly would i place that?
Where you want to Jared. You can call a function from anywhere, and after any event you want. So I can't answer this. Only you can.
and what is my variant?
The variant is a data type, which I'm sure you know. Functions have optional input variables, which are listed in () after the function name. You have one listed as "testvalue", and declared as a variant data type:
Code:
Function nnz([COLOR="Red"]testvalue As Variant[/COLOR]) As Variant
 
sounds like you are trying to verify that some variable is numeric. what circumstances lead you to make this test? is it in a query? or is it in some code? what are you trying to achieve?
 

Users who are viewing this thread

Back
Top Bottom