To refresh Excel file every 1 second

BarbD

New Member
Joined
Sep 28, 2011
Messages
1
I am a novice. This is code I found through a Google search:
Code:
Sub Calculate_Range()


 Range(“A1:I25").Calculate


 Application.OnTime DateAdd(“s”, 1, Now), “Calculate_Range”


End Sub

When I try to run this code I get a Compile error Syntax error. Can you help me to update this code to include a range that would include more of the sheet, like A1:I5000?

MS Excel 2013
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

dUBBINS

Well-known Member
Joined
Feb 9, 2015
Messages
504
Okay, I never tried this, but after googling your question, I found this:

Application.OnTime Now + TimeValue("00:00:01"), "Calculate_Range"

And you can just change the range in your code from I25 to I5000 or whatever you want.

I have no idea what you are forcing it to calculate; however, that range is 40k cells. If you have too many formulas in there, this is may slow down Excel too much to calculate every second. But again, I have no idea what you are doing. And if it freezes up, hit ESC.
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,123,156
Messages
5,600,040
Members
414,357
Latest member
Gemma_R

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top