Results 1 to 2 of 2
Thread: AutoOpen Macro
2001-01-30, 23:16 #1adagbayGuest
I am using a lookup command from one XL worksheet to another sheet. The source sheet has more than 18,000 records and XL delivers a memory error on all links to files with excess of 17,000 records. One way around this is to open the source files before opening the sheet referencing the source file. How can I create a macro to run when the dependent file is opened to open the source file before finally opening the dependent file? (I hope that makes sense)
2001-01-31, 10:45 #2
- Join Date
- Jan 2001
- Adelaide, South Australia
- Thanked 0 Times in 0 Posts
Re: AutoOpen Macro
Something along the lines of the following should do the trick:
Application.Calculation = xlCalculationManual 'Turn off automatic calculation
Workbooks.Open ThisWorkbook.Path & "book3.xls"
Application.Calculate 'calculate all the links
The only thing I'm not sure about is when Excel will try to recalculate the links. In order to make certain that things stay healthy, it might be an idea to turn off automatic recalculation before you open the first workbook.