#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    123
    Rep Power
    13

    wrong number of arguments or invalid property assignment


    Hi,

    I'm trying to go through a UDT array (code below) but get a "wrong number of arguments or invalid property assignment" error at the bolded bit (Course.Participents is a Get Property that returns an array):

    Dim l As Long

    For l = 0 To UBound(Course.Participents)
    lsParticipents.AddItem Course.Participents(l).ipFullName
    Next l


    help would be appreciated
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Are you sure that Course.Participents(l).ipFullName is returning the values you think it is?
    Try putting a breakpoint on the loop and use debug.print to echo some of the values.
    If one of the values is null then it would cause your error.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    123
    Rep Power
    13
    the problem is that the execution doesn't get even into the sub - the compiler throws the error (which gets thrown again if I try to check values in the immediate window).
    I've checked (using IsArray) and the property does return an array.

IMN logo majestic logo threadwatch logo seochat tools logo