application.ontime

  1. davewatson86

    vba Appliation.onTime Running twice

    Morning/Evening all i have the below code set to update the data in a file every 5 min but it is running the Update sub twice one immediately after the other. i do not have the code (Application.OnTime mTimerTime, "my_Procedure") anywhere else in any other subs so im a bit stumped. where am i...
  2. F

    Need to edit my code

    Hello Frinds i want to make some changing in my account. i want if bu8<>0 then it copy the value of selected range from sheet 1 to sheet 2. i don't know about vba. my friend says me it will be by event change in my main updatedata but i don't know how to write code for it. as you can see that...
  3. L

    Using Application.OnTime

    Hello guys, I'm trying to setup a timeout for a macro I'm creating, it reaches out to a file, if that file is open it times out for 10 sec and then tries again. My initial approach was to make a do loop for x seconds, but that was an awful idea because it prevents other actions from happening...
  4. C

    RE: Stopping macro execution without generating an error message....

    RE: Stopping macro execution without generating an error message.... This code displays a userform every 5 seconds t = Now() + TimeSerial(0, 0, 5) Application.OnTime t, "RepeatMSG" And the macro which displays the form: Sub RepeatMSG() Userform.Show t = Now() +...
  5. C

    Getting Application.ontime in a For loop to work correctly...

    This code Private Sub cmdFindDate_Click() Dim i, n As Integer Dim t For i = 2 To [A65536].End(xlUp).Row n = Day(Cells(i, 1).Value) If n = Day(Now()) Then t = Now() + TimeSerial(0, 0, 10) Application.OnTime t, "RunNewSetMSG" Else MsgBox "value...
  6. O

    Application.OnTime TimeValue

    Hi everyone. I have this command "Application.OnTime TimeValue" on my workbook while it is open. I just like to know if that command will continue it's assigned task based on the time given on everyday basis or just the day that the workbook is open? Thanks Application.OnTime...
  7. M

    Help with comparing timer with static time

    <tbody> I wonder if any members of this forum could kindly help me with this problem? In my spreadsheet, cell DD4 has a countdown timer running, linked to a website, and the timer runs down to zero 00:00:00, and then continues past zero with a negative sign, e.g. -00:01:00 after one minute...
  8. D

    Application.OnTime macro no longer running under Win 10 and Office 2016

    Dear, I have a macro which has been working for long time under Windows 7 and Office 2010; however, when migrating to Windows 10 and Office 2016, it stops working. I am wondering if the forum can assist me to identify the problem. The first part deals with the execution at opening the workbook...
  9. A

    Userform timer function.

    Hello, How can we change the below code function. Istead time I need a timer... Once userform pop ups timer will start. Thanks Option ExplicitDim Tempo As Date Sub clock1() Tempo = Now + TimeValue("00:00:01") Application.OnTime Tempo, Procedure:="Lable_Text", Schedule:=True End Sub Sub...
  10. R

    Can't stop my Application.OnTime macros

    I subscribe to a service that sends real-time updating stock prices directly to my spreadsheets. (Hoadley Financial Add-Ins for Excel.) Using various posts on this site, and much trial and error, I cobbled together a little VBA code that monitors these stock prices and notifies me when my open...
  11. F

    Userform Timed with Timer Cancellation Button.

    I have a timer once my workbook opens, after one minute aUserform pops up, and asks if you are still using the file. If you hit yes, theoriginal timer resets but if you hit no the workbook closes. However, when theuserform pops up a second timer starts, when this timer times out it closes...
  12. T

    VBA Code Forcing File to Reopen when closed

    I have the following code in my modules. It works great, for what it was intended to do. (Keep a running clock for scheduling purposes, break meal penalties etc) The issue arises if you have two copies of the file open at the same time. When two files with this code in it ARE open, when you...
  13. Z

    Application.Ontime ?

    Hi, I been researching this today but i am getting stuck. I would like to run a Sub () in my personal workbook called Sub T205 () on Fridays at 6pm eastern time. Not sure what Application.Ontime to use and where to put it into. Can I put it into my personal workbook to run that sub? Do I have...
  14. M

    Stopwatch is greying out undo

    Hi, I have a stopwatch which is working great except when a user opens a new workbook the undo function is unavailable. It becomes available again when the clock is stopped. I have the code below in a module. Does this happen to anyone else? Option Explicit Dim NextTick As Date, t As Date...
  15. J

    Help with Autosave macro when multiple workbooks open

    Hi, i have the following code which works great with just the one open workbook. But it runs into problems if other excel workbooks are open Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime dTime, "autoSave", False End Sub Private Sub Workbook_Open() dTime = Now +...
  16. J

    Triggering Macro hourly without onTime ?

    Hi, Thinking of ways I can trigger a macro hourly without using application.ontime application.ontime can cause issues and I don't find it too reliable. My idea was to have a cell containing current time =Now()-Today() Then cells with a 1/0 flag for each hour Worksheet_Change event with if...
  17. F

    VBA End Application.Ontime Macro

    Morning all, I'm not a VBA pro, so you can imagine my delight when I managed to auto start a macro, that made the test in one of my cells "blink". However, the file now opens everytime I close it - because I haven't ended my Application.OnTime and I just can't get my head round it. So, in my...
  18. W

    Scheduling a Macro to Run at 6 Specific Times Throughout the Day

    Hi, I'd like to apologize in advance if the following question seems rudimentary as I'm very new to VBA. However, i've written a macro that basically just pastes a row as values for every sheet in my workbook. I would like for this to run automatically at 6 specific times throughout the day...
  19. S

    Application.OnTime Machine Operation Limits?

    Greetings, I have a number of scraper like subs that I would like to automate. for this task I am using a number of subs to serve as the timing tool like the one below: Sub YZ_ST19() RW19 = Now + TimeSerial(744, 0, 0) Application.OnTime EarliestTime:=RW19, Procedure:=RWCALL19, _...
  20. P

    How to automatically run macro when open workbook

    I have a clock that works off from auto refresh and works great but I have to start it off from a button. How would I change my code to automatically run when I open the workbook so I can eliminate the button? Dim SchedRecalc As Date Sub Recalc() With Sheet1.Range("A1") .Value = Format(Time...

Some videos you may like

This Week's Hot Topics

Top