+ Reply to Thread
Results 1 to 4 of 4

position of shape

Hybrid View

  1. #1
    Registered User
    Join Date
    09-29-2003
    Posts
    22

    position of shape

    Hi

    I am trying to get the screen position of a text box so I can draw an arrow to it

    I created it using:

    ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, posx, posy, lenx, leny).Select

    But later in the code I can;t sem to find any way of determining it position


    Have tried

    Activesheet.shapes("my shape"). nodes.item(2).left
    Activesheet.shapes("my shape"). nodes.item(2).top
    etc...

    But no joy

    Any ideas ?

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Shapes

    You can use:

    Activesheet.shapes("my shape").left =
    Activesheet.shapes("my shape").top =

    Activesheet.shapes("my shape").width =
    Activesheet.shapes("my shape").height =

  3. #3
    Registered User
    Join Date
    09-29-2003
    Posts
    22
    no his does not work

    you can set the shape using

    ActiveSheet.Shapes("my_shape").Left = 10#

    but

    xpos=ActiveSheet.Shapes("my_shape").Left

    gives nothing

    Sorry if my original question was unclear as to what I needed: I want to read the position - not set it.

  4. #4
    Registered User
    Join Date
    09-29-2003
    Posts
    22

    Red face

    woops - sorry yes it does work

    curx=activesheet.shapes("my_shape").left

    is a winner - error in my syntax when I tried it first time

+ 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