![]() |
|
|
|
#1
|
|||
|
|||
|
I have a spreadsheet that collects data from an external program. And when I open the spreadsheet the data auto updates to the current time, using the formula =NOW() So it would help me greatly if I could find a way for this spreadsheet to auto update, let's say, every minute. Please help me...thanks. |
|
#2
|
|||
|
|||
|
Code:
Option Explicit
Dim TimeToRun
'Sub auto_open()
' Call ScheduleclrCol 'uncomment this for code to auto run when sheet is opened
'End Sub
Sub ScheduleclrCol()
TimeToRun = Now + TimeValue("00:01:00") '<----- adjust time to fire here HH:MM:SS
Application.OnTime TimeToRun, "runmycode"
End Sub
Sub runmycode()
'Your code here <--- place your code here to be run once per minute
Call ScheduleclrCol
End Sub
'Sub auto_close() 'uncomment this for code to auto stop when sheet is closed
' On Error Resume Next
' Application.OnTime TimeToRun, "clrCol, , False"
'End Sub
Sub manual_stop() 'button click for stop (Manual Stop)
On Error Resume Next
Application.OnTime TimeToRun, "clrCol", , False
End Sub
|
|
#3
|
|||
|
|||
|
Thanks for your help!!!!
|
|
#4
|
|||
|
|||
|
You are welcome.
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Stop Automatic Date-Update
|
janetb | Word | 10 | 11-10-2016 12:05 AM |
| Automatic Form update | rlmoss44 | Word VBA | 6 | 12-03-2015 09:27 AM |
| help needed for automatic update of footer | sanju71821 | Word | 7 | 07-01-2015 08:18 AM |
| How can I automatically update my spreadsheet with report generated from Access | shilabrow | Excel | 5 | 05-18-2014 03:59 PM |
Automatic Update of links has been disabled:
|
Kal | Excel | 1 | 03-21-2010 09:37 AM |