我有 VBA 脚本来从口腔数据库中检索数据。脚本用于打开现有文件,然后在 excel 中做一些时髦的事情。问题是弹出消息说“你想保存更改吗?” 如何避免此弹出消息
'open a new worksheet in Excel
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\Users\combbn\Desktop\Reportt\Quary_Result.xls")
Set objSheet1 = objExcel.ActiveWorkbook.Worksheets(1)
objWorkbook.Activate
objWorkbook.SaveAs "C:\Desktop\Reportt\Quary_Result3.xls"
objWorkbook.Application.Quit
Set objWorkbook = Nothing