moving textboxes/labels through vba?

Espinoza84

Registered User.
Local time
Today, 06:31
Joined
May 30, 2008
Messages
55
Through the help and suggestion of this board users, I have a CASE driven code for my report I am working on. I am hiding/showing (visible=true/false) some textboxes/labels.

Now, I am wondering if I can also move textboxes/labels through vba coding?
For example, What would be the syntax to move "Text5"; 3 spots to the left, or 3 clicks to the left or whatever it is called?

Is it even possible?

Thanks in advance.
 
I think you can move it by changing it's Left and Top properties. I've never actually needed it.
 
And I think the units are twips - ?
 
Text6.Left = 2773

Cool thanks!

now to play around with the twips number lol

ah guessing time I guess ;o

edit: actually there is 1440 twips in 1 inch, and lucky the property box of any label/textbox tells me their position in inches, so it should not be too hard.

thanks all.
 
Text6.Left = 2773

Cool thanks!

now to play around with the twips number lol

ah guessing time I guess ;o

edit: actually there is 1440 twips in 1 inch, and lucky the property box of any label/textbox tells me their position in inches, so it should not be too hard.

thanks all.

Yeah, I never convert them anymore. I just use the inches measurement and multiply:

Me.MyTextBox.Left = 3.58 * 1440
 
I have a line I am trying to move through vba:

CASE "ECO"
.line26.left = 60
.ine26.width = 10980 'This code works, my line displays fine

This code does not work:

CASE "LAN"
.Line26.Left = 1140
.Line26.Width = 9900 'notice i reduced the width so that it fits in the same page. Even if I reduce the width to like 5900 the code does not run.

Any idea why?
 

Users who are viewing this thread

Back
Top Bottom