Postioning a text box with VBA code

G

Guest

I have a text box and label that I want to move and resize when a subform is
made visible. To begin with they are at the left margin and I want to move
them to 3.8
I have tried two ways and various numbers and doesn't work

Label29.Left = 3.8
or
with Label29
.Left = 3.8
end with

with Text1
.Left = 3.8
.Width = 4.0
end with
 
F

fredg

I have a text box and label that I want to move and resize when a subform is
made visible. To begin with they are at the left margin and I want to move
them to 3.8
I have tried two ways and various numbers and doesn't work

Label29.Left = 3.8
or
with Label29
.Left = 3.8
end with

with Text1
.Left = 3.8
.Width = 4.0
end with

Is that suppose to be 3.8 inches from the left margin?
You must convert your measurements into Twips... 1440 per inch.
Label29.Left = 3.8 * 1440
Text1.Width = 4.0 * 1440
 
G

Guest

I solved it myself. I saw something about twips so I changed the values to
5500 and everything positioned and resized correctly
 
G

Guest

Thanks fredg

fredg said:
Is that suppose to be 3.8 inches from the left margin?
You must convert your measurements into Twips... 1440 per inch.
Label29.Left = 3.8 * 1440
Text1.Width = 4.0 * 1440
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top