I write the following testing code for checking how I can pass user defined type in function running well with in module. But when I made the same the function in class it
Not works? Give me the Error

Only Public User Defined Types Defined In Public Object Module Can Be Used As Parameters Or Return Types For Public Procedures of Class Modules Or as Fields of public User Defined Types


How can I make the same function in Class?
VB Code:
  1. Public Type MyType ' In Module
  2.     First As String
  3.     Second As Long
  4. End Type
  5. Public Function TestType(ByRef TypeIN() As MyType) 'In Module
  6. Dim A As Integer
  7.     For A = 1 To 2
  8.         MsgBox TypeIN(A).First & TypeIN(A).Second ' Get Data
  9.         TypeIN(A).First = "Test" & A 'Set Data
  10.         TypeIN(A).Second = A 'Set Data
  11.     Next A
  12. End Function
  13.  
  14. Private Sub Command1_Click()
  15. Dim TestingType(1 To 2) As MyType
  16.     TestingType(1).First = "First A" ' Set Data
  17.     TestingType(1).Second = 1 'Set Data
  18.     TestingType(2).First = "First B"
  19.     TestingType(2).Second = 2
  20.    
  21.     Call TestType(TestingType())
  22.     MsgBox TestingType(1).First & TestingType(1).Second ' Get Data
  23.     MsgBox TestingType(2).First & TestingType(2).Second ' Get Data
  24.    
  25. End Sub