Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-14-2017, 07:58 AM
Frenchy305 Frenchy305 is offline Windows 10 Office 2013
Novice
 
Join Date: Dec 2015
Location: Indiana
Posts: 4
Frenchy305 is on a distinguished road
Default Automatic Update for Excel Spreadsheet

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.
Reply With Quote
  #2  
Old 07-14-2017, 08:47 AM
Logit Logit is online now Windows 10 Office 2007
Competent Performer
 
Join Date: Jan 2017
Posts: 128
Logit is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 07-14-2017, 11:57 AM
Frenchy305 Frenchy305 is offline Windows 10 Office 2013
Novice
 
Join Date: Dec 2015
Location: Indiana
Posts: 4
Frenchy305 is on a distinguished road
Default That did it!!!!

Thanks for your help!!!!
Reply With Quote
  #4  
Old 07-14-2017, 12:17 PM
Logit Logit is online now Windows 10 Office 2007
Competent Performer
 
Join Date: Jan 2017
Posts: 128
Logit is on a distinguished road
Default

You are welcome.
Reply With Quote
Reply

Thread Tools
Display Modes


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


All times are GMT -7. The time now is 08:39 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft