+ Reply to Thread
Results 1 to 5 of 5

Animate a Logo; Visual component failure

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Animate a Logo; Visual component failure

    Okay it's got to be easy, but I can't figure it out. I've had the attached for a few years, and hadn't tried it out on 2013 Excel until today. The whole idea is to shrink and spin the logo. If I walk through the macro it does just that. However, if I run the macro I can't see anything happen. All code is in the "ThisWorkbook" module. I'd sure appreciate it if anyone can help with this.

    Thanks,
    Jomili
    Attached Files Attached Files
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Animate a Logo; Visual component failure

    To not change the code too much, in my opinion:
    1. Slow down the loops in functions and throw away "Application.ScreenUpdating = False/True"
    2. "Shape.Visible = True" in functions can be blocked/commented
    3. Functions to transfer to the "standard" module

    try maybe e.g.:

    1. ThisWorkbook module:
    Please Login or Register  to view this content.
    2. Standard module:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mjr veverka; 05-10-2018 at 06:05 PM.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Animate a Logo; Visual component failure

    Thanks Porucha. Going with your suggestions I've removed the "ActiveSheet.Shapes("Picture 2").Visible" TRUE and FALSE lines, and removed the Screenupdating lines. I like the way you threw in the "one_moment_please" timer to slow down the action; I thought that might be the issue, but wasn't sure how to address it. Not sure how "one_moment_please" and "cntrlr" work together; you start "cntrlr" with a value of .06, then allow "one_moment_please" to run until it's value exceeds "cntrlr" + .44. Would you mind explaining the logic behind that and how it all works together?

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Animate a Logo; Visual component failure

    1.
    Please Login or Register  to view this content.
    This "cntrlr + 0.44" (= 0.5 s, where cntrlr = 0.06) is just a delay in showing the "Spin" button, it's only local.
    It does not take part in the operation of the functions.

    2.
    Please Login or Register  to view this content.
    Regarding (As for the ... ?) 'DoEvents' function, you can get more information from the Ms contextual help, than from me with my poor English.
    "Do While Timer - one_moment_please < cntrlr" is just an ordinary loop that works for as long as the condition is met.
    'DoEvents' transfers control to the system, which allows you to complete the collected tasks. It's a kind of task retarder without too much suspending the system.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Animate a Logo; Visual component failure

    I just added a couple of DoEvents inside the loops and it works.

    If you want to slow things done you could make use of the Sleep API.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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. Animate a strikethrough
    By Excel_vba in forum PowerPoint Formatting & General
    Replies: 1
    Last Post: 04-16-2014, 10:47 PM
  2. Animate text in table, row by row
    By Samonomics in forum PowerPoint Formatting & General
    Replies: 1
    Last Post: 08-19-2013, 05:54 AM
  3. add automatically a component to component palette
    By Maileen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2006, 12:10 PM
  4. [SOLVED] Visual Component Manager for VBA
    By R Avery in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2005, 11:06 PM
  5. [SOLVED] Animate excel?
    By BAM718 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2005, 12:06 PM
  6. how do you animate a cell
    By atbs in forum Excel General
    Replies: 0
    Last Post: 03-14-2005, 12:06 AM
  7. How to animate a GIF
    By glomarexplorer in forum Excel General
    Replies: 0
    Last Post: 02-02-2005, 12:46 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