ontime

  1. A

    Application.OnTime Issue

    Hi all, I have what seemed like simple vba code from Microsoft's website, but I am running into errors. I have a workbook where a userform opens when the workbook is started and a message prompts that a macro will run in 90 seconds unless the command button is clicked. Clicking the button...
  2. H

    OnTime Applying all open Workbook and reopening the Excel sheet which was closed

    I have This in My ThisWorkbook Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) With ThisWorkbook.Worksheets("My_Subs") Application.Run "CommandButton2_Click" End With End Sub Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:30"), "Save1" End Sub And...
  3. A

    VBA code that start with Windows Scheduler is repeatedly running

    Hello everybody, I have what I assumed was a pretty simple code, but for some reason it keeps rerunning, so perhaps there is an error in my code, or maybe just a smarter way to go about doing this. Here is the This workbook code: Private Sub Workbook_Open() Application.Visible = False...
  4. V

    VBA Macro for ontime start and end time

    I have a VBA Macro which runs in loop as below, want to specify the start and end time for it to run. Could any of your please help me. Sub execute() '' Should run only if current time start time is between 11:00 to 14:00 Do MsgBox "test", vbInformation Loop End Sub
  5. F

    Application ontime running randomly !!

    Hello , I have a vba code which captures the data every 20 second from a dynamically changing cell value and stores in the sheet along with some calcuations using Application.Ontime In the sheet , on checking the difference with the timestamp, show data has been entered at 20 seconds most of...
  6. R

    Save file x minutes after a value is entered

    Hi, I have created a spreadsheet for uses to record production testing results ad this forum has been essential in automating some of the task. But now if find that users are not saving the results. I know I can use the OnTime application to autosave the file but I only want this to kick in...
  7. L

    Macro Wont Run When cell is selected ... Application.OnTime EarliestTime:=DownTime

    Hi all, I have a workbook that we use in work in work with a timer function that shuts down the workbook when the workbook hasn't been used for 15 minutes. However, if my peers select a cell and go into edit mode then no macros run and then they go home so no one can edit it. Is there a...
  8. D

    Ontime Event Going haywire at midnight

    Hello! I have a excel project that starts an ontime event on workbook open. This thing works fantastic! However, when midnight rolls around it crashes. After doing some research I have surmised that the problem is when the date changes, the time is now After the initial time set. I tried to...
  9. J

    Run-Time Error 1004 when Stopping Application.OnTime Procedure

    I wrote a macro that allows a user to time the duration of their call through a UserForm, while they continue to enter data about their call on an excel sheet. Most of the time the macro works perfectly but occasionally (randomly it seems) I get an error when attempting to pause/stop the OnTime...
  10. N

    Application.OnTime Unreliable

    Hey all, So I'm coding a program which I want several macros to run about every hour of the day. With my current implementation it works rather often but on a few occasions I'll come into work and notice that new day has not triggered. This happens about once a week without pattern (fails on...
  11. P

    Combination of Application.OnTime + Locked Session + Userform

    Hi all, I wrote a small application.ontime to win some time in the morning, which launch a macro before me arriving at my workplace At the time set by my application.ontime, my computer is opened and only my session is locked Public Sub StartTimer() h_go =...
  12. P

    Excel Addin to save cell value in database periodically

    I have created an Excel Addin in VBA which reads a cell value and save in SQL database. In Addin, I have created a VBA function SubmitCellValue in a module which can be called as =SUBMITCELLVALUE(A7) in excel and save value from A7 in database. Above part is working fine, Now I want to add a...
  13. D

    Use of Application.OnTime from a function

    I am trying to simulate some logic within a spreadsheet in Excel. All the basic logic gates are obvious but I am having trouble generating a pulse function. My intention was to create a function that would set the value of the cell to 1 and then clear it down to 0 after a delay using the...
  14. L

    Repeat several macros every 24h without having to restart the workbook.

    Hi All, Below is the code I use to trigger few macros in different time intervals. Currently I have to remember to close and open workbook at least once in 24 hours otherwise the macros will not perform very important tasks. I was searching though forums and I was trying to implement things I...
  15. O

    Get to know if in Break-Mode and/or on what line?

    Is there a way to know programmatically that we are in BreakMode and maybe even know on what line? I found out that using apostrophes one can start OnTime with parameters and not having the error "Can't execute code in break mode". Application.OnTime now, "'MySub " & now & "'" This will...
  16. T

    Using Application.OnTime Needs to Run Procedure ONLY ONCE

    Thanks in advance for any help provided. Hello, I am kinda of a newbie who has learned everything I currently know about Excel VBA through Google. I have now reached a state where I don't know how to ask Google what I want. So..... I am trying to run a Logsheet spreadsheet which calls DDE...
  17. C

    Application.OnTime Stopping

    So I created the below schedule within the ThisWorkbook object. The schedule worked effectively (when excel wouldn't get closed due to system restart or some other reason - or execute multiple time due to state <> false). However after 5 days the schedule just stopped firing. I isolated...
  18. C

    Application.OnTime Stopping

    So I created the below schedule and within the ThisWorkbook Object. The schedule worked effectively (when excel wouldnt get closed due to system restart or some other reason). However after 5 days the schedule just stopped firing. Isolated events and times for launch and ensured that this sub...
  19. T

    Running a sub once every minute

    Hi I wrote a specific Sub that does out a calculation, and I want that sub to run once every minute (automatically AKA without having to manually click the routine). how can I do this? I know its something involving Application.Ontime but not sure how to write out the code for this. Any help...
  20. K

    Macro to Save As Backup File or Create a Pop Up to save File

    I am not GREAT at Macros, so I will try and explain what I need the best I can. We have a workbook that has a macro already with a Live Clock that calculates the job times etc. It is on a Server for remote access and used by many people 1 at a time. I look in the file at the data to send...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top