Error in Call statement

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have the following UDT defined in a base module:
Type RecordCC
CatScore(15) As Single
End Type

Type RecordC
Valid As Integer
Year As String * 4
ModelID As String * 5
ContestantName As String * 30
ModelName As String * 30
JudgesScore(3) As RecordCC
JudgeTotalScore(3) As Single
Expansion As String * 20
FilePos As Integer
End Type
Public gModelRec As RecordC
Public gDummyModelRec As RecordC
Public gModelArray() As RecordC

Also in the Base Module I have this sub:

Public Sub AdjustPrtLine(ModelRec)
' do something
End Sub

In a form I have the following call statement:
Call WMAAShow_General1.AdjustPrtLine(gModelArray(N1))

However, when I try to run it I get the message:
" Only user defined types defined in public pbject modules can be coerced
to or from a variant or passed to a late bound function."

I am at a loss to understand what this means. I think I have the UDT defined
in a public base module. What obvious thing am I missing?

Marv

.



Relevant Pages

  • Re: Error in Call statement
    ... Type RecordCC ... ModelID As String * 5 ... Public gModelRec As RecordC ... Also in the Base Module I have this sub: ...
    (microsoft.public.vb.general.discussion)
  • Re: Error in Call statement
    ... Type RecordC ... ModelID As String * 5 ... Public Sub AdjustPrtLine(ByRef ModelRec as RecordC) ... Public ModelID As String * 5 ...
    (microsoft.public.vb.general.discussion)