+ Reply to Thread
Results 1 to 15 of 15

Auto-refresh an image inside a spread sheet every 19 seconds

  1. #1
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Exclamation Auto-refresh an image inside a spread sheet every 19 seconds

    Have live data feeds that link to a server upstairs in the control room that display on custom control screens. Every 19 seconds a new screen capture taken and over writes an images on the network hard drive. This information is extreme vital. i want to embed these images into my dashboard but they need to be refreshed every 19 seconds. What kind script do i need to have it refresh in the background?


    the Mucbean

  2. #2
    Registered User
    Join Date
    02-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Something like this might get you started

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    thanks i will add it in see how we make out . I'm assuming i'll need to make that image an active x control as its LAN hyperlink as well

  4. #4
    Registered User
    Join Date
    02-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Give it a try and see which way works best.

    I've used this to capture sample images off vision systems over IP and it worked fine.

  5. #5
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Ant seem to get it to work, the file is a png file, Excell doesn't recongnize it for some reason ..

  6. #6
    Registered User
    Join Date
    02-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Quote Originally Posted by mucbeanz View Post
    Ant seem to get it to work, the file is a png file, Excell doesn't recongnize it for some reason ..
    I use .png images in excel regularly.
    How did you insert the image originally?

  7. #7
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    just insert the photo, I'm assuming i should've used an activex insert instead linking that code to it?

  8. #8
    Registered User
    Join Date
    02-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    I just ran this and it worked without error

    Try setting the path to your image


    Please Login or Register  to view this content.

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Hi, just curious, have you been able to solve this?
    I was wondering if you can still work with the file while the timer is running.
    I use the Application.OnTime construction you have macros run at specific intervals and in the mean time I can still work in that file and it works in the background, you just have to make sure the timers are stopped before closing Excel. The images shouldn't be a problem
    Will the image always have the same name?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  10. #10
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    @ihmha I will try that once i get to work. Sure would be pretty cool to pull this off. Those 2 images are absolutely critical or our shop area, an unfortunately you need to goto a computer to view the screen. Theres a good chance i could have this new dashboard displayed on one of the 70" screen out on the floor. So surprised no one has ventured down this road before esp the size the the company i work for. Thanks for your help on this! I will let yo know how it turns out. The second image refreshes every 30 seconds, which is pretty easy change. Logically the code makes perfect sense esp the delete and new insert function Will let you know how it turns out.

    cheers mucbeanz

  11. #11
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    so i tried it a few times at work the first time i crashed excel into not responding. . made some adjustments then tried the activex picture had the control present but the image wouldn't show however after 9 seconds the active control disappeared. the image is actually a web address (LAN) not sure whether that makes a difference. but i was unable to get it working

  12. #12
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Do you get any error message?
    I think it's the way the timer is set.

  13. #13
    Registered User
    Join Date
    02-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Quote Originally Posted by Keebellah View Post
    Hi, just curious, have you been able to solve this?
    I was wondering if you can still work with the file while the timer is running.
    I use the Application.OnTime construction you have macros run at specific intervals and in the mean time I can still work in that file and it works in the background, you just have to make sure the timers are stopped before closing Excel. The images shouldn't be a problem
    Will the image always have the same name?
    I have never had any problems with working whilst this is running in the background.
    The timer function uses the inbuilt timer, and as you are only checking the value every scan you can run the other code as normal.

    Quote Originally Posted by mucbeanz View Post
    @ihmha I will try that once i get to work. Sure would be pretty cool to pull this off. Those 2 images are absolutely critical or our shop area, an unfortunately you need to goto a computer to view the screen. Theres a good chance i could have this new dashboard displayed on one of the 70" screen out on the floor. So surprised no one has ventured down this road before esp the size the the company i work for. Thanks for your help on this! I will let yo know how it turns out. The second image refreshes every 30 seconds, which is pretty easy change. Logically the code makes perfect sense esp the delete and new insert function Will let you know how it turns out.

    cheers mucbeanz
    Use two dblTimer (dblTimer_1 and dblTimer_2) values and make them separate loops and time intervals

    Quote Originally Posted by mucbeanz View Post
    so i tried it a few times at work the first time i crashed excel into not responding. . made some adjustments then tried the activex picture had the control present but the image wouldn't show however after 9 seconds the active control disappeared. the image is actually a web address (LAN) not sure whether that makes a difference. but i was unable to get it working
    The web address will make a difference.
    I think you need to use a hyperlink, and do a refresh and not a delete.
    Although I've never tried it so I hope someone else has experience in this area and throws some help in.

    Quote Originally Posted by Keebellah View Post
    Do you get any error message?
    I think it's the way the timer is set.
    The timer is the real time clock built into Windows, all the code does is sample the timer and use it for the compare in order to run the code inbetween.

  14. #14
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    If you're embedding the link as text into a variable you must make sure there are no blanks (spaces), if there are then replace the blanks with %20 or else it will NEVER work !

    So in the macro

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    10-09-2015
    Location
    Kitchener ONT
    MS-Off Ver
    2013
    Posts
    78

    Re: Auto-refresh an image inside a spread sheet every 19 seconds

    Ok awesome, I will try again tomorrow when I back into work. It makes sense what your saying I wondering mostly though whether I embedded that image correctly will do what you mentioned and get back to you thank you!

+ 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. Auto Tabulating Materials Spread sheet
    By tscott8201 in forum Excel General
    Replies: 5
    Last Post: 04-02-2015, 05:22 PM
  2. Auto update or refresh workbook in every 15 seconds
    By rp301987 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2014, 08:19 AM
  3. [SOLVED] how to insert image in the ImageList with the image inside the tab?
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2014, 09:21 AM
  4. Auto refresh every 5 seconds in Excel
    By pritzdk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2011, 06:55 AM
  5. Auto update or refresh workbook in every 15 seconds
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-18-2011, 07:10 PM
  6. Auto alocation of data from one spread sheet to another
    By tyler.dreger in forum Excel General
    Replies: 4
    Last Post: 01-24-2009, 05:08 PM
  7. [SOLVED] Help about image transfer to excel spread sheet
    By Ali Noor in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-02-2006, 12:00 PM

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