Solved

How to set Left and Top positioning in VBA

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

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
Comment Utility
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
Comment Utility
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

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
You are welcome ...
Thank you for using Experts Exchange

mx
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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 how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

772 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

10 Experts available now in Live!

Get 1:1 Help Now