Solved

How to set Left and Top positioning in VBA

Posted on 2011-02-16
4
1,016 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) 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 - Microsoft MVP, Access and Data Platform) 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

Back Up Your Microsoft Windows Server®

Back up 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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views 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 Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

730 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