Results 1 to 3 of 3

Thread: Get the group of shapes properties(height, width, top, left, right, bottom)

  1. #1
    Senior Member LalitPandey87's Avatar
    Join Date
    Sep 2011
    Posts
    222
    Rep Power
    14

    Get the group of shapes properties(height, width, top, left, right, bottom)

    Hi Experts,

    I have used some shapes in a worksheet and grouped it named Group 1.
    Now how can i get the height, widht , top, left, right, bottom values of Gropu 1.

    Thanx in Advance.

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi,

    This would give you

    Code:
    Sub kTest()
        
        Dim objGrp  As Object
        
        Set objGrp = Worksheets("Sheet1").Shapes("Group 1")'<< adjust the sheet,shape(group) name
        
        With objGrp
            Debug.Print "Height:" & .Height
            Debug.Print "Top:" & .Top
            Debug.Print "Width:" & .Width
            Debug.Print "Left:" & .Left
        End With
        
    End Sub
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Senior Member LalitPandey87's Avatar
    Join Date
    Sep 2011
    Posts
    222
    Rep Power
    14
    Thanx for this useful function.
    Working!

Similar Threads

  1. Delte a specific column and does not delete the top row
    By jffryjsphbyn in forum Excel Help
    Replies: 1
    Last Post: 06-13-2013, 02:00 PM
  2. Sort Data Using Formula To Find Top X
    By mahmoud-lee in forum Excel Help
    Replies: 12
    Last Post: 06-02-2013, 10:13 PM
  3. Set Adjust A Button Top Left Position Programmatically
    By jeffrey159 in forum Access Help
    Replies: 5
    Last Post: 02-02-2013, 06:24 PM
  4. How to make Dynamic range (width) with OFFset function
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 12
    Last Post: 12-01-2012, 11:03 PM
  5. Left and Right Mouse Click Event
    By PcMax in forum Excel Help
    Replies: 10
    Last Post: 11-24-2012, 04:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •