Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: How can I made a marco run every hour and a half?

  1. #11
    Guest

    Default

    don't have time to try them now, have to go to work, will try them later hope one will work. Thanks

  2. #12
    Guest

    Default

    still can't get the code to stop running tried the codes that were posted but i don't know much about vba. thanks for the help

  3. #13
    Guest

    Default


  4. #14
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    What code do you have ??

    Basically when using App ontime you make
    the call to run a procedure @ a set time.

    When this time is reached and the
    macro you specified runs you then need to
    make a call to disable it other wise ontime
    keeps working in the background in the open
    Excel app.

    Post what you are actually using


    Ivan




  5. #15
    Guest

    Default

    Ivan this is what I got from this board, I need it to run every 90 Minuets it does this but I need to know haw to cut it off, Thanks

    Public ThisTime As Double


    Sub startoff()
    ThisTime = Now + TimeValue("01:30:00")
    Application.OnTime EarliestTime:=ThisTime, Procedure:="DoIt"
    End Sub

    Sub DoIt()
    Application.ScreenUpdating = False
    Run "StartOff"
    ' TEST CODE
    Range("A1").Select
    Selection.Copy
    Range("a65536").Select
    Selection.End(xlUp).Select
    ActiveCell.Offset(1, 0).Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub

  6. #16

    Join Date
    Feb 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this :-

    Dim ThisTime As Date

    Sub StartDoingIt()
    DoItAgain
    End Sub

    Sub DoItAgain()
    ThisTime = Now + TimeValue("0:01:00")
    Application.OnTime ThisTime, "DoItAgain"
    DoIt
    End Sub

    Sub DoIt()
    [A1].Copy [A65536].End(xlUp)(2, 1)
    End Sub

    Sub StopDoingIt()
    On Error Resume Next
    Application.OnTime ThisTime, "DoItAgain", schedule:=False
    End Sub

    Sub Auto_Close()
    StopDoingIt
    End Sub

    Note : I have set the time at 1 minute so you can test it.


    [ This Message was edited by: Escalus on 2002-03-08 18:22 ]

    [ This Message was edited by: Escalus on 2002-03-08 18:23 ]

  7. #17
    Guest

    Default

    That works! Thanks. Love the way you made the copy A1 thing work! Maybe I will learn a little more someday.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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