Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从另一个 Excel 电子表格导入数据库查询。每次更新时,它都会打开从中提取信息的电子表格。我不希望这种情况发生。关于我应该采取什么措施来阻止这种情况发生的任何想法?
尽管我认为打开此工作簿可能会导致其他问题,但要找回您的工作簿的句柄,请尝试...
If Err.Number = (The error number you get) then Set xlWorkbook = GetObject("C:\Test\MyWb.xlsx", "Excel.Application") end if