Hi All,
I have got the following code to refresh a webquery, sort the info and store it.
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 16/11/2006 by Sam Prince
'
' Keyboard Shortcut: Ctrl+q
'
Range("A3:G42").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Sort Key1:=Range("B3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("Sheet2").Select
Rows("4:4").Select
Selection.Insert Shift:=xlDown
Sheets("Sheet1").Select
Range("E3:E22").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Range("A4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[1]C+R[-3]C"
Range("A5").Select
Sheets("Sheet1").Select
Range("B3").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub
Does anyone know how I can set it to run independantly every 10 mins?
Ty
SP.
Bookmarks