text box location in form using VBA

Esmatullaharifi

Registered User.
Local time
Today, 03:59
Joined
Jul 11, 2014
Messages
27
I have one text box with the name of nametxt and one it's label with name of namelabel. I want to relocate this text box with it's label when the button02 is clicked to the new location. Thus i have tried using this code:
Code:
Private Sub Command02_Click()
nametxt.Top = 0.2083
nametxt.Left = 1.0833
namelabel.Top = 0.2083
namelabel.Left = 0.5833
End Sub
But this code is not working correctly and relocate the text box to the up left corner of form. How fix this issue.
I waiting for your help.
thanks,
 
Not sure about the code but you used to have to use twips or something like that to locate things on a form...
 
My purpose is the relocating of text box not the way of relocating.
You can help by sending a VBA code that can relocate the text box. I waiting to you.
 

Users who are viewing this thread

Back
Top Bottom