Forum Discussion

ChristopherWels's avatar
ChristopherWels
Occasional Contributor
14 years ago

VB script : Function with return value and argument

Hi all,

The function i wrote looks like this



Function example1(ByVal id As Integer) As Boolean

if( id = 1234) Then

           return false

End if

 if( id = 4321) Then

          return false

End if



return true



End Function



I think this is regular VB Syntax.

But the compiler doesn't accept "(ByVal id As Integer)"



And if I write just "Function example1() As Boolean"

I get the Errormassage : Presencing expected



Thankz for Help :)

11 Replies