Solved

How to set Left and Top positioning in VBA

Posted on 2011-02-16
4
1,014 Views
Last Modified: 2012-05-11
I'm attempting to set the Left and Top positions for images that will be displayed on a screen using code like this in the Form_Load() event:

Me.oleLegal.Visible = True
Me.lblLegal.Visible = True
Me.oleLegal.Left = 2.2188
Me.oleLegal.Top = 0.4271
Me.lblLegal.Left = 2.2188
Me.lblLegal.Top = 1.4271

Presently the images are displaying at the top left of the screen.  I would arrange the images "by hand" on the form, but users have different security levels, and I want the display to look uniform.  Thanks in advance for your help, and let me know if I need to clarify anything.
0
Comment
Question by:dhjensen
  • 3
4 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 34909167

Example

Me.oleLegal.Left = 1440* 2.2188
Twips                     ^^^^^

add this to each calc.

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 34909193
From Help - Top (et al) Property:

" .... In Visual Basic, use a numeric expression to set the value of this property. Values are expressed in twips (twip: Unit of measurement that is equal to 1/20 of a point, or 1/1,440 of an inch. There are 567 twips in a centimeter.)."

IE   1440 twips per inch

mx
0
 

Author Closing Comment

by:dhjensen
ID: 34909286
MX:
Perfect!  Thanks very much--I'm on a deadline, and stuff like this can be very frustrating.  Thanks again, and well done!
0
 
LVL 75
ID: 34909316
You are welcome ...
Thank you for using Experts Exchange

mx
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question