生成excel报表的时候,没有根据checked来生成的。只能根据某些的条件。
或者试试代码
Dim idxs As String = "-1,"
For Each r As Row In Tables("合同打印_table1").Rows
If r("配送公司名称") = Forms("合同打印").Controls("TextBox2").text Then
r.Checked = True
idxs &= r("_Identify") & ","
End If
Next
Tables("合同打印_table1").Filter = "_Identify in (" & idxs.trim(",") & ")"