• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Determine .left and .top of a moved UserForm

smiley

New Member
I've created a UserForm which I've positioned at a specific spot, but the user can change where they want it to appear on the screen. However, I also open another UserForm with additional information that i would like to slightly overlap the original UserForm. But if the user moved it, I no longer know where it is to overlap the second UserForm. How can I determine the .left and .top positions of the moved UserForm? I've done some searching on the Internet, but for some reason all I'm finding is how to set the original startup position of the UserForm, and not how to determine where the UserForm has been moved.
 
I've created a UserForm which I've positioned at a specific spot, but the user can change where they want it to appear on the screen. However, I also open another UserForm with additional information that i would like to slightly overlap the original UserForm. But if the user moved it, I no longer know where it is to overlap the second UserForm. How can I determine the .left and .top positions of the moved UserForm? I've done some searching on the Internet, but for some reason all I'm finding is how to set the original startup position of the UserForm, and not how to determine where the UserForm has been moved.
I think I just found my solution!

Code:
TextBox1 = Me.Left

TextBox2 = Me.Top
 
Back
Top