+ Reply to Thread
Results 1 to 7 of 7

Rotating group of shapes in excel VBA

  1. #1
    Registered User
    Join Date
    10-28-2013
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    9

    Rotating group of shapes in excel VBA

    I did use the solution in a thread by Andy to make a picture or shape rotate. It works perfectly as a standalone. With this I mean all the information on the same sheet as per example in the file 901259.

    I'am using it to rotate a dial.
    The problem is instead of using the value from the sheet itself I link the scrollbar to a cell on a different sheet in the same workbook. There some calculations are done and the value which makes the dial rotate is linked to that sheet. The dial however is on another sheet.

    The calculations are almost displayed realtime but the dial is lagging. How would I go about to "solve" this lagging.

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

    Re: Rotating group of shapes in excel VBA

    If you are using a Forms control then the update will not occurr unit the mouse is released.
    Activex control will update in real time
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-28-2013
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Rotating group of shapes in excel VBA

    The slider (ScrollBar1) is an active X control on Sheet1. I configured the Scrollbar now to sent the value to eg cell M3 on Sheet1 and use the formula =ROTATE_SHAPE( "Sheet1";"Group 11";-M3). Furthermore I did expand Sheet1 to the left since the Group 11 box hit the border of Sheet1 and I thought it might hinder the rotation.

    The dial is spinning in real time now.

    I want to sent the value of ScrollBar1 to a sheet called "DATA". In the property of the ScrollBar1 I linked to cell DATA!I1. DATA is the sheet where the calculations are done. From DATA the value's are sent to various cells on Sheet1 to be displayed. The value to make the dial spin is also sent to this sheet and changes the reference from M3 to a reference on DATA.

    This is when the dial starts lagging behind.

    The problem therefore I suppose is in sending the data back and forth between the 2 sheets. Actually I should have a parallel output from the ScrollBar1.

    Any suggestions?

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

    Re: Rotating group of shapes in excel VBA

    post an example of your workbook so we can see the actual problem

  5. #5
    Registered User
    Join Date
    10-28-2013
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Rotating group of shapes in excel VBA

    The example is according to your given example. Scrollbar1 is linked to cell M3 and makes the dial spin I want it.
    Attached Files Attached Files

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

    Re: Rotating group of shapes in excel VBA

    I changed the link for the scroll bar. Also set the LargeChange to 1.
    Removed the UDF that was referencing a non existent shape "Group 12".

    It only lags when you drag the scroll bar adjuster back and forth.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-28-2013
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Rotating group of shapes in excel VBA

    Thank you Andy.

    Of all the possibilities I didn't figure this linked cell reference.

    Your correct the group 12 in non existing. I did remove it but will be there in the final version. It is a second dial with an arrow rotating around the circumference of the dial and pointing out the direction the wind is coming from.

    I will mark this succesfully solved

+ 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] Group Shapes with VBA
    By nicotob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2012, 05:12 AM
  2. [SOLVED] Group Specific Shapes Excel VBA
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2012, 02:26 AM
  3. How to select a group of shapes and textboxes with a vba macro in excel Mac 2011?
    By eratosthene in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-03-2012, 10:19 PM
  4. rotating shapes in Excel worksheet
    By donkersr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2011, 11:45 AM
  5. Group and Name Shapes - How
    By barryleajo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2010, 07:32 AM

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