Automatic refresh function by interval

EE Pros,

I'm doing testing on what needs to appear as "real time data" and statistics on different Sensors.  I need to start out easy on this so I have attached a spreadsheet that has a Column E that needs to be refreshed at a particular frequency (in seconds) -- perhaps set up as a simple looping exercise.  So when the sheet is open, it will automatically fire off the function to randomly produce new data at the frequency specificed.

Also, this change in the function should not update any other =randbetween( , ) calculations.
C--Data-Temp-Date-Time-Calculation.xls
Bright01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FamousMortimerCommented:
Hi,

Does this work for you?  You can change the code in TheSub to whatever you need it to do and change the variable cRunIntervalSeconds to the interval in number of seconds you want it to run.  Right now I just set it to calculate the activesheet which will recalc your random functions
0
BitsqueezerCommented:
Hi,

that can't be done with a function but you can use the "Workbook Open" event to start a timer using the "Application.OnTime" method (see Excel help for further details).

With this you can specify a VBA procedure which updates the wanted cell(s) to the wanted values at the given time and then it only needs to use the Application.OnTime method again to set the next interval (Now() plus 5 seconds).

Of course you would need to save the file as macro enabled file.

Cheers,

Christian
0
FamousMortimerCommented:
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Bright01Author Commented:
FamousMortimer,

I downloaded the WS but there is no Sub.

B.
0
FamousMortimerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bright01Author Commented:
FamousMortimer,

Thank you!  Great work!

B.
0
FamousMortimerCommented:
You are very welcome.  Glad to help and thanks for the grade!
0
Bright01Author Commented:
I'm posting a version 2 request.  Hope you will pick it up!

B.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.