View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Excel web auto-refresh

I don't know why you would get such as result. I tested the code in
both XL2003 and XL2007 and it worked as expected. As is noted on the
web page, though, if the Windows timer pops when you are editing a
cell, it is quite likely that Excel will crash.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Thu, 23 Oct 2008 21:39:48 +0100, "teepee"
wrote:


"Chip Pearson" wrote in message
.. .
You can use the OnTime method to call a procedure, and that procedure
can then call Refresh on the query tables. See
http://www.cpearson.com/excel/OnTime.aspx for information and example
code for using OnTime and Windows Timers.


Hmm I tried the method using Windows Timer in Excel 2007. I set a cell to
display TimerID (as below) expecting the cell to display a count every
second, but instead it jumped to 30,687 and crashed. Obviously I'm missing
something here 8-)

Any thoughts on what I'm doing wrong?

Many thanks in advance

Sub TimerProc(ByVal HWnd As Long, ByVal uMsg As Long, _
ByVal nIDEvent As Long, ByVal dwTimer As Long)
Range("a24").Select
ActiveCell = TimerID
End Sub