When the workbook first opens, execute this code:
alertTime = Now + TimeValue("00:02:00")
Application.OnTime alertTime, "EventMacro"
Then just have a macro in the workbook called “EventMacro” that will repeat it.
Public Sub EventMacro()
'... Execute your actions here'
alertTime = Now + TimeValue("00:02:00")
Application.OnTime alertTime, "EventMacro"
End Sub
Related Contents:
- Loop through files in a folder using VBA?
- Excel column number from column name
- Is it possible to write Excel VBA Code in Visual Studio
- Protecting cells in Excel but allow these to be modified by VBA script
- Removing the password from a VBA project
- How to check for empty array in vba macro [duplicate]
- How to continue the code on the next line in VBA
- Use of symbol # (hash) in VBA Macro
- How can I color dots in a xy scatterplot according to column value?
- How to wait until ActiveWorkbook.RefreshAll finishes before executing more code
- Determining the full type of a variable
- Levenshtein Distance in VBA [closed]
- What does the Excel range.Rows property really do?
- How can I generate GUIDs in Excel?
- Programmatic Access To Visual Basic Project Is Not Trusted
- vba: get unique values from array
- How to “flatten” or “collapse” a 2D Excel table into 1D?
- How do I get the old value of a changed cell in Excel VBA?
- Delete Sheets and avoid Excel asking the user to confirm, using custom messages instead
- Get User Selected Range
- Relative instead of Absolute paths in Excel VBA
- Getting Excel to refresh data on sheet from within VBA
- Quickest way to clear all sheet contents VBA
- How can I programmatically freeze the top row of an Excel worksheet in Excel 2007 VBA?
- Excel: macro to export worksheet as CSV file without leaving my current Excel sheet
- Execute a command in command prompt using excel VBA
- Repeated calls of Chart.SetSourceData give error 1004
- VBA Runtime Error 1004 “Application-defined or Object-defined error” when Selecting Range
- What is the function of FormulaR1C1?
- Put Excel-VBA code in module or sheet? [closed]
- HTML Text with tags to formatted text in an Excel cell
- Insert line break in wrapped cell via code
- Stopping Excel Macro executution when pressing Esc won’t work
- How do I get a range’s address including the worksheet name, but not the workbook name, in Excel VBA?
- Find the directory part (minus the filename) of a full path in access 97
- ByRef argument type mismatch in Excel VBA
- How to avoid using Select in Excel VBA
- How to comment and uncomment blocks of code in the Office VBA Editor
- Where does VBA Debug.Print log to?
- Does VBA have Dictionary Structure?
- Deleting a file in VBA
- What is the difference between “Form Controls” and “ActiveX Control” in Excel 2010?
- How can I create a progress bar in Excel VBA?
- How can I concatenate strings in VBA?
- How to add default signature in Outlook
- Does the VBA “And” operator evaluate the second argument when the first is false?
- How can I create a calendar input in VBA Excel?
- How to get the excel file name / path in VBA
- How do you run a .exe with parameters using vba’s shell()?
- How to call python script on excel vba?