如何知道数组中有多少已经有内容?
Private Sub Command2_Click()Dim l_tbl_test(1 To 10) As rec_test
l_tbl_test(1).div_opt = "1"
l_tbl_test(1).div_opt_desc = "AAAAAAAA"
For i = LBound(l_tbl_test) To UBound(l_tbl_test)
If Len(l_tbl_test(i).div_opt) = 0 Then
MsgBox "Last Record Number " & i
End If
Next i
End Sub
期望返回"Last Record Number 1", 可惜什么都没显示。
如何解决?