+ Reply to Thread
Results 1 to 5 of 5

Positioning of textbox

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    Positioning of textbox

    Hi you'll

    please see: http://www.excelforum.com/excel-prog...s-visible.html
    for the beginning of the solving from my problem.
    In short: I like Textboxes to stay visible where ever you scroll to. I have found the code to do that:
    Please Login or Register  to view this content.
    .

    My question is: what does the # 151 (in this case) means? It is not the pixels. But what then?
    I would make my life a lot easier if i know what this number means so I can position my Textboxes where I want them to be, and stay where they are when scrolling through the sheet.

    Any answer is welcome.

    marcoAUA.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,068

    Re: Positioning of textbox

    hi,
    it's a distance. take it out and you see the textbox's position.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Positioning of textbox

    = .Top is the top of the application.
    = .Left is the left most of the application.

    (In a blank, newly opened worksheet, = .Top, = .Left would generally represent the position of Cell A1)

    So = .Top and = .Left+151 represent the position of your text box as the upper left most portion of the visible worksheet, incremented by a value of 151 to the right.

    I have not seen any documentation as to the exact definition of
    a) what the numbers represent (you will see them called 'values' or indexes'; or
    b) how many there are on a given screen under a given resolution so as to properly manipulate in a known (or unknown) environment.

    -as-
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Positioning of textbox

    It is in points rather than pixels.
    Good luck.

  5. #5
    Registered User
    Join Date
    01-10-2012
    Location
    Aruba
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: Positioning of textbox

    How much distance is then 1 point?

    In column width is given in 2 numbers: i.e. 8.43 (64 pixels) in a newly opened wb.
    Is it known how these points relate to the column width or height?

    It would make it a lot easier to position textboxes when you know this relation.

    THNX

+ 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