|
楼主 |
发表于 2020-11-3 19:37
|
显示全部楼层
谢谢指出BUG,梳忽了,在 UserForm1 里面的一句代码改下位置:
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim ls, drr, i, j, k, c, c0, cc, shn As String, ii, d, ku, dz
'.........
ReDim drr(1 To UBound(arr), 1 To cc)
For i = 2 To UBound(arr)
'If shn = "送货单" Then d = arr(i, 4): ku = arr(i, 1): dz = arr(i, 2) ' 这句删除,应放在下在的循环内
If CStr(arr(i, c)) = ls Then
k = k + 1
For j = 1 To cc
drr(k, j) = arr(i, j + c0)
Next
If shn = "送货单" Then d = arr(i, 4): ku = arr(i, 1): dz = arr(i, 2) '放这里才能和查询数据对应
End If
Next
|
|