+ Reply to Thread
Results 1 to 3 of 3

Stop Animated Gif from Playing using VBA

  1. #1
    Registered User
    Join Date
    11-03-2022
    Location
    SG
    MS-Off Ver
    Excel 2016
    Posts
    4

    Stop Animated Gif from Playing using VBA

    Hi, I searched but I can't find a solution online. Is there a way to stop an animated gif from playing when the workbook opens? I have gif images on mutiple sheets, and all of it playing at one go is causing it to lag a lot. I was hoping to be able to play the gif only on the sheet that is currently being viewed, and once it switches to another sheet, that gif would stop playing. I tried using excel's macro recorder to see what the commands were for pausing/playing a gif, but the only thing that came up was ActiveSheet.Shapes.Range(Array("Picture 2")).Select, literally nothing about pasuing or playing the gif. Any help would be appreciated, but if not, I could forgoe the gifs. It would be interesting to know how to go about doing something like that...

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,401

    Re: Stop Animated Gif from Playing using VBA

    "
    Re: Can't get GIF to stop animating

    Tommt2T's code illustrates the "proper" way to control a GIF animation in a PictureBox, but if all you want to do is to start or stop the animation you can set the PictureBox.Enabled property to True or False respectively. BB "

    https://www.vbforums.com/showthread....stop-animating

  3. #3
    Registered User
    Join Date
    11-03-2022
    Location
    SG
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Stop Animated Gif from Playing using VBA

    Hi, thanks for the tip. I will take a look and see how I can implement it!

+ 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. Animated background
    By sterio in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2015, 07:44 PM
  2. Animated gif's
    By bogey69 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-28-2014, 07:06 PM
  3. Excel 2007 : Insert Animated GIF
    By Jamesflc in forum Excel General
    Replies: 1
    Last Post: 10-05-2009, 11:30 AM
  4. Animated GIF
    By Greg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2006, 05:20 AM
  5. Animated charts
    By unique in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-03-2005, 09:50 PM
  6. Animated .gif
    By Brad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2005, 01:05 PM
  7. animated pictures
    By ismail in forum Excel General
    Replies: 0
    Last Post: 03-03-2005, 02:06 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