Application screenupdating excel macro

29 Dec

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. Visible = False 'Visible is False by default, so this isn't necessary Dim book As Excel. If Patrick Mc Donald'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: Dim Temp Wk Bk As Workbook Dim Current Win As Window Set Current Win = Active Window Set Temp Wk Bk = Workbooks. Activate 'Allows only a VERY brief flash of the opened workbook Temp Wk Bk. Visible = False 'Only necessary if you also need to prevent 'the user from manually accessing the opened 'workbook before it is closed. In excel, hide the workbooks, and save them as hidden. Edit: upon re-reading, it became clear that these workbooks are not part of your application.

Is there a way to have them open "in the background", so to speak? 'Operate on the new workbook, which is not visible to the user, then close it... Such a solution would be inappropriate for user workbooks.

It 'doesn't have to be column A - it could be any column.

Borrowing the connection string from a project I've used it on, it will look kinda like this: Note that "Registration List" is the name of the tab in the workbook. For example if the workbook contains product names and price data it can be hidden and you can show an Excel file that represents an invoice with drop downs for product that validates from that price list.

It is not unlike the example, where we used the search function, but here we loop through the cells instead.

'This macro shows how to hide rows automatically by 'typing a certain or random letter in column A.

To unzip, right-click and select whatever Windows suggests to unzip the archive. You can do it "automatically" by putting code in the worksheet's code sheet.

The Work Sheet_Change procedure is activated every time something is changed in the worksheet. The next two macros are examples of what I call "automatic code," because they execute automatically, if a certain condition is met.