VB中 总是报”要求对象“的错误 具体过程如下
i = 1
Do While i <= 7
voucherentrys.Add
With Voucher.entries(Voucher.entries.Count)
.explanation = CStr(MSFlexGrid1.TextMatrix(i, 1))
Dim mrs As Object
Dim str As String
coNN.ConnectionString = K3Login.PropsString
coNN.Open
str = "select * from t_account where fnumber='" & MSFlexGrid1.TextMatrix(i, 2) & "'"
Set mrs = coNN.Execute(str)
.accountid = mrs("faccountid")
.amount = Val(MSFlexGrid1.TextMatrix(i, 5))
.amountfor = Val(MSFlexGrid1.TextMatrix(i, 5))
.exchangerate = 1
.currencyid = 1
If MSFlexGrid1.TextMatrix(i, 4) = "借" Then
.dc = 1
Else
.dc = 0
End If
End With
报错的地方已经标红 请行家解答,灌水走开