+ Reply to Thread
Results 1 to 9 of 9

Auto update or refresh workbook in every 15 seconds

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Arrow Auto update or refresh workbook in every 15 seconds

    Hi All,

    I have a workbook, which has some external web links to auto update the current time of different cities. The workbook automatically refreshes in every 1 minute, but I made below codes for auto refreshing the workbook in every 15 seconds.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I see that it works fine, but I'm unable to stop it at any moment at the time of closing the workbook, and I am shocked when the workbook automatically opens just after the closing whether I save the data or not. :O

    How can I do the auto updating activity of web links to a single worksheet instead of the whole workbook? I'm unable to work anywhere in this workbook due to it gets busy/ stuck while updating or refreshing.

    How can I show/add a message in a cell: -
    The workbook/ worksheet will be refreshed in 10 seconds
    The workbook/ worksheet will be refreshed in 9 seconds
    ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
    ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
    The workbook/ worksheet will be refreshed in 1 second



    Please find the attached workbook and try to help me for the right solution.
    Thanks in advance!

    MS Excel version: 2007
    Last edited by SunOffice; 04-18-2011 at 07:08 PM.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto update or refresh workbook in every 15 seconds

    Hi SunOffice
    Yeah, this is a bit scary isn't it
    I am shocked when the workbook automatically opens just after the closing whether I save the data or not.
    You need a Workbook BeforeClose Event to turn the timer off. Google on "stop timer on workbook close vba" and you'll find many references to this issue. If you can't get it resolved, let me know.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Auto update or refresh workbook in every 15 seconds

    I googled and tried with some below codes, but nothing is working fine for me.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I found StopTimer2 code from : http://www.excelforum.com/excel-prog...r-closing.html

    Please see the above attached workbook and help me out....
    Last edited by SunOffice; 04-16-2011 at 07:30 AM.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto update or refresh workbook in every 15 seconds

    Hi SunOffice
    This code works for me:

    In your ThisWorkbook Module
    Please Login or Register  to view this content.
    In a General Module
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-15-2011
    Location
    Porto
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Auto update or refresh workbook in every 15 seconds

    Quote Originally Posted by jaslake View Post
    Hi SunOffice
    This code works for me:

    In your ThisWorkbook Module
    Please Login or Register  to view this content.
    In a General Module
    Please Login or Register  to view this content.
    HI

    I have tried the above code and it also doesn't work. It is able to put on the Excel sheet the actual time but after 15 secs when it is suposed to refresh it gives an error. The error message says that the Excel is unable to execute de macro "Refresh.Time"

    Can you help please?

    thanks
    Dedes

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto update or refresh workbook in every 15 seconds

    Do you have a macro called
    "Refresh.Time"
    The code references "RefreshTime"

  7. #7
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Auto update or refresh workbook in every 15 seconds

    It's working fine now!!

    so you mean that here two macro codes will call each other for continuous refreshing the workbook in every 15 seconds of interval.

    Thanks a lot Mr jaslake!

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Auto update or refresh workbook in every 15 seconds

    Hi SunOffice
    The code I've provided is what I use. Yes
    so you mean that here two macro codes will call each other for continuous refreshing the workbook in every 15 seconds of interval
    as long as you've not closed the workbook, the Timer will run. When you close the workbook, the Timer is turned off.

    If that satisfies your need, please mark your thread as "Solved".

    To mark your thread solved do the following:
    - Go to your first post on the thread
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solved
    - Click Save

  9. #9
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: Auto update or refresh workbook in every 15 seconds

    Mr. jaslake,

    Got It! Thanks a world for ur wonderful support & idea!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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