ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2003 v Excel 2007 (https://www.excelbanter.com/excel-discussion-misc-queries/210388-excel-2003-v-excel-2007-a.html)

teepee[_3_]

Excel 2003 v Excel 2007
 
I am using the command Activeworkbook.RefreshAll in a spreadsheet, referring
to a data table earlier gathered using the command:

ActiveWorkbook.XmlImport URL:= http://xxx.xxx.xxx.xxx, ImportMap:=Nothing,
Overwrite:=True, Destination:=Sheets("Sheet1").Range("$A$3")

It's being used in a timer programme to refresh every 1 second - see below.
The idea is to refresh my data from the network every second.

My problem is that in Office 2003 it won't refresh at all, even when I set
the timer to refresh at 10 seconds or 30 seconds.
In 2007 it will refresh, but every 5 seconds max. I'm on a very fast
connection which I know can support the data transfer at that speed.

Any ideas?

Sub StartTimer()
'Application.ScreenUpdating = False
TimerSeconds = 1 ' how often to "pop" the timer.
TimerID = SetTimer(0&, 0&, TimerSeconds * 1000&, AddressOf TimerProc)
' Application.ScreenUpdating = True
End Sub

Sub EndTimer()
KillTimer 0&, TimerID
End Sub

Sub TimerProc(ByVal HWnd As Long, ByVal uMsg As Long, _
ByVal nIDEvent As Long, ByVal dwTimer As Long)
ActiveWorkbook.RefreshAll

End Sub




All times are GMT +1. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com