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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refesh Excel Every (well less than the maximum 1 minute) 1

Status
Not open for further replies.

iCougari

IS-IT--Management
Jul 30, 2003
13
US
Hello Everyone and thanks for your time for reading this.

If i am querying data from a database and returining it to excel i have the option to automatically update the data (refresh every XX option). The lowest level or maximum level depending on how you look at it is every 1 minute.

I need this to be say every 10 seconds. As this is updating a live LED display board which is linked to the excel sheet.

Any suggestions will be welcomed.

Already played around with a timer embedded in excel with no luck (brain cells just not there). There must be a little bit of code that fires off the refresh, if only i could grab that bit and fire it off every 10 seconds.

Regards

James
 
To set off the refresh, just use
Code:
.Querytables("QuerytableName").refresh

To use the timer, direct from XL Help:

Code:
'This example pauses a running macro for approximately 10 seconds.

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime


Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top