Repositioning a control using Visual Basic

  • Thread starter Thread starter scott
  • Start date Start date
S

scott

I want to reposition some controls when I click a button and I'm not having
much luck. Any help is appreciated. The code I am using is
Me!Frame28.Top = 5.8646

It repositions the contro to the top of the form. If I try to add the inch
sign ("), of course it is looking for additional code to end the statement.
'"' doesn't work either.

Thanks.
 
scott said:
I want to reposition some controls when I click a button and I'm not having
much luck. Any help is appreciated. The code I am using is
Me!Frame28.Top = 5.8646

It repositions the contro to the top of the form. If I try to add the
inch
sign ("), of course it is looking for additional code to end the
statement.
'"' doesn't work either.


In VBA code, all measurements are in "twips". 1 twip = one-twentieth of a
point = 1/1440 inch. That is, there are 1440 twips in an inch. So if you
want to position the control's top at 5.8646 inches, you should write:

Me!Frame28.Top = 8445
 

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

Similar Threads


Back
Top