在按钮里加也可以啊。
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "excel|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Tables("实操潜能表").Filter = Tables("实操潜能表").Filter & " and 实操考核时间 is not null"
MessageBox.Show("你要保存为:" & dlg.FileName,"提示") '提示用户选择的文件
Dim Book As New XLS.Book(ProjectPath & "Attachments\实操登分.xls")
Book.Build() '生成细节区
Book.Save(dlg.FileName) '保存工作簿
MessageBox.Show("保存成功" )
End If