Article ID: 108709
Article Last Modified on 12/9/2003
Type newinfo
tarray() as string 'Gives "Expected: Expression" error on ()
numstores As Long
End Type
Type newinfo
tarray(20) As String 'Static array declared in user-defined type
numstores As Long
End Type
Sub Form_Load ()
' Use ReDim to declare or redimension a dynamic array:
ReDim arrayx(20) As newinfo 'Make dynamic array of user-defined type
arrayx(18).tarray(12) = "Ruby slippers" ' Assign value.
arrayx(18).numstores = 999 ' Assign value.
form1.Show ' In load event, must Show form before Print can work.
Print arrayx(18).tarray(12) ' Print value.
Print arrayx(18).numstores ' Print value.
End Sub
Visual Basic version 3.0 for Windows, "Programmer's Guide," Chapter 7, "User-Defined Types (Structures)", pages 176-178. A user-defined type can contain an ordinary (fixed-size) array, but not a dynamic array.
Additional query words: 2.00 3.00
Keywords: kbcode KB108709