View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RocketMan[_2_] RocketMan[_2_] is offline
external usenet poster
 
Posts: 19
Default HELP "ByRef Argument Type Mismatch"

I get the compile error: ByRef Argument Type Mismatch
at the line Call Upate(itercount, a(i))

and it doesn't make sense to me. I am passing only one element of an
array and the types seems fine to me.

HELP

Here is the example:

Private type Iteration
Name as string
count as integer
end type

private type j
domain as string
it() as Iteration
end type

public function start()
dim i, itercount as integer
dim a(500) as j
itercount = Worksheet("iters").Range("c1")
for i = 0 to 499
redim a(i).it(itercount ) as Iteration
Call Update(itercount, a(i))
next

end function

' NOTE this function is in a separate ( .xla sheet) Module

Public Function Update(byval icount as long, byref DomIters as j)
' stuff done in here
end function