Results 1 to 10 of 10

Running a Macro every 10 mins.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-05-2006
    Posts
    143

    Running a Macro every 10 mins.

    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.
    Last edited by VBA Noob; 01-02-2008 at 03:36 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1