5,138
社区成员
发帖
与我相关
我的任务
分享
Private Type CFSReceivingdata
SO As String
KGS As Integer
CBM As Single
Yn As Boolean
rwindex As Integer
End Type
Private CFSRecedata(50000) As CFSReceivingdata
..............
..............
With TagSheet
For Each rwobj In .Rows
Dim cfsobj As CFSReceivingdata
cfsobj.SO = Trim(.Cells(rw, 1).Text)
cfsobj.KGS = CInt(Trim(.Cells(rw, 12).Text))
cfsobj.CBM = CSng(Trim(.Cells(rw, 11).Text))
cfsobj.Yn = False
cfsobj.rwindex = rw
CFSRecedata(i) = cfsobj
rw = rw + 1
i = i + 1
Next
End With
'Error message is :
'For each may not be used on array of user-defined type or fixed-length string
for each obj in CFSRecedata '<---CFSRecedata 被加亮
..........
..........
next
请朋友纠正并指出出错的原因