+ Reply to Thread
Results 1 to 5 of 5

Change Shape Size / Keep its Position

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    Windsor, UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Change Shape Size / Keep its Position

    Hi All

    Hope someone can help me...

    I have an autoshape on an sheet, and use this code (it's a circle), to rezise it....

    Please Login or Register  to view this content.
    However, it does rezise it, but the shape doesn't keep it's central position. Is there a bit of code I can add to stop the shape from moving? In other words, have the shape rezise around it's center of location?

    Many thanks for any help!
    Last edited by Broobi; 07-10-2014 at 12:05 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Change Shape Size / Keep its Position

    I think you'll need to alter the left and top also, so left = current left-(new width/2) and the same for the top

    I think
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    03-12-2014
    Location
    Windsor, UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Change Shape Size / Keep its Position

    Hi nathansav.

    Thanks for your reply.

    I see, do you mean, width 'divided' by 2?

    also, how do I determine the current left?

    Ma

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Change Shape Size / Keep its Position

    Yes, think so

    so if youre moving from 40 to 60 it will
    Please Login or Register  to view this content.
    and .top is the other.

  5. #5
    Registered User
    Join Date
    03-12-2014
    Location
    Windsor, UK
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Change Shape Size / Keep its Position

    Perfect! - Thank you so much :D

+ 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. How to change or standardize size and position of plot areas
    By tensor9 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-17-2013, 06:59 AM
  2. Shape size based on text in shape
    By mwc48910 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2011, 05:43 AM
  3. Change size and position of Buttons on Excel sheet?
    By excelbobabc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2009, 11:01 PM
  4. How can I change the shape and size of the boxes in an org chart?
    By helenfanig in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-02-2006, 02:20 PM
  5. Replies: 1
    Last Post: 03-03-2005, 02:06 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