HorizontalAnchor

abenitez77

Registered User.
Local time
Today, 12:29
Joined
Apr 29, 2010
Messages
141
How can I set the HorizontalAnchor and VerticalAnchor on a form via vba? I am able to do it manually but can't figure it out in vba.
 
If I remember correctly, these are design-view-only changes.
 
for horizontal anchor, use 0 for left, 1, for right and 2 for both. Similar for Vertical anchor

ctrlname.HorizontalAnchor=0
or
ctrlname.HorizontalAnchor=acHorizontalAnchorLeft

but if you are using vba, it all come up with intellisense anyway, so not sure why you are having a problem
 
I believe the post has been solved here.

ab77/abenitez77,
It is considered good etiquette to inform others when you cross post. It isn't wrong to cross post, but doing so without informing readers is bad practice.

see this for more info
 
Last edited:

Users who are viewing this thread

Back
Top Bottom