+ Reply to Thread
Results 1 to 5 of 5

Form Position using .top and .left

  1. #1
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Form Position using .top and .left

    Hi

    I have a worksheet that saves the values of .top and .left so that users may position a form to suit their preferences. However I noticed that there is a small difference between the value recorded and the value read (see attached). Originally I thought that it was related to the border of the form, but then found that the values were different for normal and fullscreen views in Excel 2000, but not in 2010. As I do not currently have any other versions to check I wonder if anyone has come across this before in other versions of Excel and if there are any other variations.

    Regards

    Jeff
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Form Position using .top and .left

    have a play with this (sit top left - zero point)
    Please Login or Register  to view this content.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Form Position using .top and .left

    I think the best way to position a form is to use Chip Pearson's code
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Form Position using .top and .left

    You can use Word's VBA to retrieve the screenresolution.
    Depending on the screenresolution you can adapt the userform's top and left-properties.

    Please Login or Register  to view this content.



  5. #5
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Form Position using .top and .left

    Hi Guys

    Thanks for the advice.

    I think the best option at present is to use variables to allow for the difference and Application.version to test for Excel 2000 and change the relevant values.

    Thanks again

    Regards

    Jeff

+ 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