Solved

How to set Left and Top positioning in VBA

Posted on 2011-02-16
4
1,013 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

862 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

Need Help in Real-Time?

Connect with top rated Experts

29 Experts available now in Live!

Get 1:1 Help Now