+ Reply to Thread
Results 1 to 4 of 4

Shape size based on text in shape

  1. #1
    Registered User
    Join Date
    03-22-2011
    Location
    Orlando, Fl
    MS-Off Ver
    Excel 2007
    Posts
    15

    Shape size based on text in shape

    I want to size a shape based upon the text contained with the shape...and do this via Excel 2007 VBA.

    Say I have a rectangle shape that is 40 pixels wide and 40 pixels high with a single line of text inside of it that would go beyond the end of the shape. I want to resize the height of the shape to accomodate the all the text. Say maybe the new rectangle might be 80 pixel high by 40 pixel wide.

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

    Re: Shape size based on text in shape

    Maybe this, although you may need to reposition the shape afterwards.

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

  3. #3
    Registered User
    Join Date
    03-22-2011
    Location
    Orlando, Fl
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Shape size based on text in shape

    I think we're on the way...what if I want the width to remain constant regardless of the text length and only vary the height so it will fit all the text?

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

    Re: Shape size based on text in shape

    I think that is how Powerpoint treats shape resizing to text.

    For Excel the width is increased and the height is shrunk.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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