![]() |
#6
|
|||
|
|||
![]()
The following works here. Paste into a Regular Module. When the workbook opens, the saving macro initiates. When the workbook closes, the macro stops.
Code:
Dim TimeToRun Sub auto_open() Call ScheduleCopyPriceOver End Sub Sub ScheduleCopyPriceOver() On Error Resume Next TimeToRun = Now + TimeValue("00:00:05") DoEvents Application.OnTime TimeToRun, "CopyPriceOver" End Sub Sub CopyPriceOver() On Error Resume Next ThisWorkbook.Save Call ScheduleCopyPriceOver End Sub Sub auto_close() On Error Resume Next Application.DisplayAlerts = True Application.OnTime TimeToRun, "CopyPriceOver", , False End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel VBA Loop to update formula in certain cells and create copy in new workbook off dynamic range | bwosk | Excel Programming | 1 | 10-07-2021 10:36 AM |
Excel 2010 - Shared Workbook greyed out | osheac3*40 | Excel | 0 | 03-08-2016 11:40 PM |
OneDrive + iPhone Excel: Cannot Update Workbook? | markg2 | Excel | 0 | 12-07-2014 09:02 AM |
Shared Excel workbook | eguru2 | Excel | 0 | 07-12-2011 12:02 AM |