ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Loop in Excel (https://www.excelbanter.com/excel-discussion-misc-queries/172482-loop-excel.html)

Mike

Loop in Excel
 
I need help with a loop. I have a macro I need to repeat every 30 seconds.
The macro refreshs a web-query. I can manually do it but I need it to be
automated if possible. My knowledge of VB is very limited. Thanks.

Sub Refresh()
'
' Refresh Macro
' Macro recorded 1/10/2008 by HP Authorized Customer
'
' Keyboard Shortcut: Ctrl+x
'
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub



Pete_UK

Loop in Excel
 
Follow this link:

http://www.cpearson.com/excel/OnTime.aspx

for information on various timers and functions.

Hope this helps.

Pete

On Jan 10, 5:22*pm, Mike wrote:
I need help with a loop. I have a macro I need to repeat every 30 seconds. *
The macro refreshs a web-query. I can manually do it but I need it to be
automated if possible. My knowledge of VB is very limited. Thanks.

Sub Refresh()
'
' Refresh Macro
' Macro recorded 1/10/2008 by HP Authorized Customer
'
' Keyboard Shortcut: Ctrl+x
'
* * Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub




All times are GMT +1. The time now is 08:17 PM.

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