Calculating Manually with a querry

S

Scot

I have created a spreadsheet that querries a data base using the SS number
as the key. Due to the size of the spreadsheet (35MB) I prefer to leave the
calculation set on manual. When I enter the SS number in the spreadsheet, I
then press f9 to begin the querry. Once the querry has imported the data I
have to press f9 again, to populate the data from the qeurry throughout the
rest of the spreadsheet. I have a macro that runs a series of calculations
to produce a report. I would like to incorporate the manual calculation
(f9) into the macro. If I simply add f9 twice in a row, it seems to happen
so quickly that the second f9 happens before the querry has completed (it
takes 5-10 seconds for the querry to be completed). Any ideas on how to
have both calculations take affect or some other way to do this?

Scot
 
B

Bob Phillips

Scot,

Precede you code with

Application.Calculation = xlCalculationManual

and reset at the end

Application.Calculation = xlCalculationAutomatic

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top