Dim max As Integer = Tables("交通参考价").compute("max(_identify)")
Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter = "Excel文件|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim mg As New Merger
mg.SourcePath = dlg.FileName
mg.Format = "excel" '指定格式
mg.SourceTableName = "材料$" '指定要合并的表的名称,源表
mg.DataTableName = "交通参考价" '指定接收合并数据的数据表的名称
mg.Merge()
End If
Dim b As WinForm.ComboBox '定义文本输入框变量
b = e.Form.Controls("ComboBox1")'文本输入框内容
DataTables("交通参考价").replacefor("年月", b.text, "_identify >" & max)
蓝老师,完整的代码是这样吗?没能实现目的