A abenitez77 Registered User. Local time Today, 12:29 Joined Apr 29, 2010 Messages 141 May 8, 2015 #1 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.
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.
T TJPoorman Registered User. Local time Today, 10:29 Joined Jul 23, 2013 Messages 402 May 8, 2015 #2 If I remember correctly, these are design-view-only changes.
C CJ_London Super Moderator Staff member Local time Today, 17:29 Joined Feb 19, 2013 Messages 17,627 May 8, 2015 #3 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
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
jdraw Super Moderator Staff member Local time Today, 12:29 Joined Jan 23, 2006 Messages 15,576 May 9, 2015 #4 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: May 9, 2015
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
A abenitez77 Registered User. Local time Today, 12:29 Joined Apr 29, 2010 Messages 141 May 9, 2015 #5 Sorry, I'll remember to keep that in mind next time.