Wrong Number Of Arguments

Results 1 to 2 of 2

Thread: Wrong Number Of Arguments

  1. #1
    Join Date
    Dec 1969

    Default Wrong Number Of Arguments

    Say i have the function<BR><BR>Function Test1(byval one, byval two, byval three)<BR><BR>and i want to call it using<BR><BR>Test1(34,45) but i dont want to include the third argument how do i do this i always get Wrong number of arguments or invalid property assignment: <BR><BR>thanks<BR>David

  2. #2
    Join Date
    Dec 1969

    Default You can't...VBS limitation...

    Only methods of ActiveX components can have optional arguments.<BR><BR>Easiest way around this with VBS is to simply pass NULL as the third argument and test for that in the function.<BR><BR>Function f(a1,a2,a3)<BR>&nbsp; &nbsp; If isNull(a3) Then ...<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts