I once asked by Joshuacht about how to make a macro running every 15 minutes. Let say because every 15 minutes we have to refresh or reload the data in the Workbook.
Below is a sample of how we can do this in Microsoft Excel *just an outline*.
The logic is simple, when we open the Workbook, we call for the first time the procedure needed to refresh the data. In that procedure, we also add a code to call back the procedure itself 15 minutes later. So while the Workbook is still open, the procedure will continue to call itself every 15 minutes.
' Put this procedure in ThisWorkbook module
Private Sub Workbook_Open()
' Run the procedure to refresh data when the workbook opened
Call RefreshData
End Sub
' Add new module and put this procedure in it
Public Sub RefreshData()
Debug.Print "Data refreshed at " & Now
'
' This is where we put everything needed to refresh the data
'
' Schedules this procedure to be run 15 minutes from now
Application.OnTime Now + TimeValue("00:15:00"), "RefreshData"
End Sub
Even looks like an infinite loop, this is not a problem for Excel when we use Application.OnTime function. The scheduling will stop automatically when the Workbook is close.
Thanks you Poer.
with pleasure
Pingback: UNCF Scholarships
Pingback: Tummy Tuck
Pingback: Tummy Tuck Pictures
Pingback: home mortgage calculator
Pingback: debt consolidation companies
Pingback: reverse mortgage calculator
Pingback: acid reflux symptoms
Pingback: dating factory bonus
Pingback: debt collection rate
Pingback: collection agency rates
Pingback: debt collection agency
Pingback: collection agency newsletter
Pingback: lose 10 pounds in a week
Pingback: credit report for free
Pingback: free fico score
Pingback: Imagenes de Amor
Pingback: wedding photographer calgary
Pingback: Peluang Usaha
Pingback: iphone 4s unlucked
Pingback: ??????????? ???????
Pingback: What is the iPhone 5 Price?
Pingback: Party Supplies UK
Pingback: flirttipps
Pingback: Erotiek Groothandel
Pingback: target online coupon codes
Pingback: Sign Maker
Pingback: hsbc credit card payment
Pingback: pret auto
Pingback: prets personnels
Pingback: web design
Pingback: scientific forex
Pingback: 3 bureau credit report
Pingback: gun shops
Pingback: hobby lobby
Pingback: SEO Services
Pingback: home depot coupons
Pingback: Foreign Exchange Clothing
Pingback: chota bheem games
Pingback: overstock promo code
Pingback: walmart coupons
Pingback: Aeropostale coupons
Pingback: amazon coupon code
Pingback: search for jobs
Pingback: Amazon promotional code
Pingback: how to check your free credit report
Pingback: amazon coupon code
Pingback: wine types
Pingback: Bed Bath And Beyond Coupon