position of control

  • Thread starter Thread starter Squibbly
  • Start date Start date
S

Squibbly

is it possible to position a control on a form using vba, and if so can you
tell me please
 
Controls have Left and Top properties (as well as Height and Width
properties) which can be set in code as twips (there are 1440 twips to the
inch, or 567 twips to the centimeter)

In other words, to position a text box named txtExample half an inch from
the top and three quarters of an inch from the left, you'd use code like:

Me.Controls("txtExample").Top = 720
Me.Controls("txtExample").Left = 1080
 
thank you MVP

Douglas J. Steele said:
Controls have Left and Top properties (as well as Height and Width
properties) which can be set in code as twips (there are 1440 twips to the
inch, or 567 twips to the centimeter)

In other words, to position a text box named txtExample half an inch from
the top and three quarters of an inch from the left, you'd use code like:

Me.Controls("txtExample").Top = 720
Me.Controls("txtExample").Left = 1080
 
Back
Top