【请教】怎样通过定义Type从字节数组中读取数据?谢谢!
有一字节数组Data(),其中有3组数据,分别为:数学,90
语文,80
英语,100
请教,怎样通过定义Type从中读取?
比如如下定义:
private type mytype
dt1 as string*2
dt2 as long
end type
Private Type MyData data1 As String data2 As String * 12 End Type Dim MyDat1(2) As MyData Private Sub Form_Click() Dim number As Integer For number = 0 To 2 MyDat1(number).data1 = InputBox("请输入科目", "提示") MyDat1(number).data2 = InputBox("请输入成绩", "提示") Debug.Print MyDat1(number).data1, MyDat1(number).data2 Next number End Sub 看看能不能解决你的问题、