Can control positions be returned in VBA?

Everton

Registered User.
Local time
Today, 21:46
Joined
Aug 10, 2000
Messages
34
Hi,

I'm trying to return the position of a label on a form using VBA. I know the top and left properties can be used to set the position, but is there any way of returning the position? What I want to do is find the position of a label then increment it by a set value after an event.

Any help apprectiated,

Paul.
 
You can use the Left and Top properties to determine the position of a control. Ex. (from a command button on your form):

msgbox "My control is at " & MyControl.top & ", " & MyControl.Left

Hope this helps,

Peter De Baets
Peter's Software - MS Access shareware and freeware http://www.peterssoftware.com
 
Cheers,
Paul.
 
Be aware that the Left, Top, Width and Height properties, when accessed from VBA, always work in 'Twips', regardless of your regional settings.

567 'twips' = 1 centimetre

Mike
 

Users who are viewing this thread

Back
Top Bottom