Create a TYPE of your own, for FRUIT
or create an array of them, and assign valuesCode:Type SystemInfo CPU As Variant Memory As Long DiskDrives(25) As String ' Fixed-size array. if you need one for each VideoColors As Integer Cost As Currency PurchaseDate As Variant End Type
Code:Dim AllSystems(1) As SystemInfo AllSystems(0).CPU = "386SX" AllSystems(0).DiskDrives(2) = "100M SCSI"
You can pass procedure arguments using a user-defined type.
Code:Sub FillSystem (SomeSystem As SystemInfo) SomeSystem.CPU = lstCPU.Text SomeSystem.Memory = txtMemory.Text SomeSystem.Cost = txtCost.Text SomeSystem.PurchaseDate = Now End Sub




If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!
Reply With Quote