I want to search through existing Excel files with a macro, but I don't want to display those files when they're opened by the code. Is there a way to have them open "in the background", so to speak?
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- How to replace file-access references for a module
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Why is file_get_contents faster than memcache_get?
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- Transactionally writing files in Node.js
- How to prevent excel from truncating numbers in a
Even though you've got your answer, for those that find this question, it is also possible to open an Excel spreadsheet as a JET data store. Borrowing the connection string from a project I've used it on, it will look kinda like this:
Note that "RegistrationList" is the name of the tab in the workbook. There are a few tutorials floating around on the web with the particulars of what you can and can't do accessing a sheet this way.
Just thought I'd add. :)
To open a workbook as hidden in the existing instance of Excel, use following:
The problem with both iDevlop's and Ashok's answers is that the fundamental problem is an Excel design flaw (apparently) in which the Open method fails to respect the Application.ScreenUpdating setting of False. Consequently, setting it to False is of no benefit to this problem.
If Patrick McDonald's solution is too burdensome due to the overhead of starting a second instance of Excel, then the best solution I've found is to minimize the time that the opened workbook is visible by re-activating the original window as quickly as possible: