Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel update too slow for VBA 1

Status
Not open for further replies.

maxpi

Technical User
Jan 18, 2001
10
0
0
US
Hi all

I have some VBA code that gets an array from the web and puts it into Excel. Then I have some functions on that page in Excel and I want VBA to copy the results of the functions to another page in Excel. I have to run the routine twice because the first time the VBA does not
wait for the calculation to take place before it copies and pastes the result to another sheet. I tried putting an "Application.calculate" statement in there but it does not help.

I also tried writing a line of code like this to do the
calculations in VBA but the VBA editor is
marking it red and I can't figure out how to write it
correctly: "Value1 = WorksheetFunction.Large(E1:E60,2)"

I do have the Excel setting to update automatically.

Max
 
Hi,

Not knowing hardly ANYTHING about your application (which could be VERY significant) except what you have posted...

let me ask a stupid question.

Why do you want the same data on separate sheets? Skip,
metzgsk@voughtaircraft.com
 

Try this:
Code:
Value1 = Application.WorksheetFunction.Large(ActiveSheet.Range("E1:E60"), 2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top