I did the follow test code:
Basically what I want it to do is to pass an array of only A to the procedure.Code:Option Explicit Public Type Test A As Integer B As Integer End Type Dim Temp(1 To 10) As Test Sub Main() Dim I% For I = 1 To 10 Temp(I).A = I Next I Call SearchInUDT(Temp().A) End Sub Private Sub SearchInUDT(Arr() As Variant) Dim I% For I = LBound(Arr) To UBound(Arr) Debug.Print Arr(I) Next I End Sub
So in the debug.print I would see:
1 2 3 4 5 6 7 8 9 10
I do know I can pass the whole UDT but what if I want to pass only one item of it (And in an array)?




VitalyB - VB6 Pro
Reply With Quote