+ Reply to Thread
Results 1 to 5 of 5

VBA Script to run a macro on the hour every hour

  1. #1
    Registered User
    Join Date
    07-11-2014
    Location
    mattoon, illinois
    MS-Off Ver
    2010
    Posts
    3

    VBA Script to run a macro on the hour every hour

    Hello,
    Looking for some help on writing a VBA script that will execute a refresh macro every hour on the hour. Not very experienced with VBA so help will be greatly appreciated.

    Using Excel 2010
    Last edited by warmajam; 07-11-2014 at 02:45 PM. Reason: spelling

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: VBA Script to run a macro on the hour every hour

    Refresh WHAT macro? You offered no information as to what you need.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    07-11-2014
    Location
    mattoon, illinois
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA Script to run a macro on the hour every hour

    I have a file that has a query and would it to automatically refresh every hour.

  4. #4
    Registered User
    Join Date
    09-28-2012
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA Script to run a macro on the hour every hour

    Please Login or Register  to view this content.
    I haven't tested this to see what it does at midnight or anything but it should work. It will run when called and then run again every hour on the hour unless you set a public boolean to true. If you set that boolean to true the timer will exit without doing anything the next time it comes time to run and not run any more until called again. Actually it runs 1 second after the hour just in case of issues with now() not flipping to the new hour before the next cycle.
    Last edited by slomer; 07-11-2014 at 04:15 PM.

  5. #5
    Registered User
    Join Date
    07-11-2014
    Location
    mattoon, illinois
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA Script to run a macro on the hour every hour

    Thank you for the code but evidently I am not as advanced as I thought I was. Going to need a step by step process to implement this code into my file as I am lost reading through your code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula to convert 24 hour day to 8 hour (working) day?
    By miro2021 in forum Excel General
    Replies: 4
    Last Post: 07-31-2017, 10:06 AM
  2. Replies: 0
    Last Post: 03-07-2014, 11:26 AM
  3. Script for adding together all measurements taken every hour
    By DBen83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2013, 01:24 AM
  4. Find hour in a range of hour values
    By mqdias in forum Excel General
    Replies: 2
    Last Post: 04-11-2011, 05:06 AM
  5. convert decimal numbers to a fraction of an hour for payroll hour
    By Flower in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2006, 03:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1