Forms("进度条").Open()
Dim p As WinForm.ProgressBar = Forms("进度条").Controls("ProgressBar1")
p.Minimum = 0 '设置最小值
p.Value = 1 '设置当前值
p.Maximum = DataTables("工资表").DataRows.Count '重新设置进度条的最大值(请老师帮助优化或修正代码)
For Each dr As DataRow In DataTables("工资表").DataRows
Dim drs As List(of DataRow) = DataTables("工资累计").Select(filter)
p.Value = p.Value + 1 '进度条当前值为已经完成的进度(显示的进度)(请老师帮助优化或修正代码)
application.Doevents
Next
Forms("进度条").Close()
[此贴子已经被作者于2019/5/5 9:29:09编辑过]