Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to set Left and Top positioning in VBA

Posted on 2011-02-16
4
Medium Priority
?
1,024 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 2000 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 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

609 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