Question Positioning A Form Using VB Code

mitch_johnson

Registered User.
Local time
Yesterday, 23:15
Joined
Mar 18, 2009
Messages
40
Hello, I need some simple code to be able to position by form when i click a button so eg set the width, height, left properties ETC...

Any Ideas Thanks
 
You need movesize.

I would suggest at first make a macro using the MoveSize action and then if you want to use VBA convert the macro.

The reason is that for the macro you enter either cms or inches and so what you enter is meaningful. VBA needs twip, I think there are 1440 twips to the inch. But when you convert the macro it also convert the cms or inches to twips.
 
an example:

DoCmd.MoveSize 1440, 2400, 2000, 2000 (in the onclick event of your command button)

Right, Down, Width, Height

Mike375 is right regarding twips and using macro :)
 
But where macros are little devils is they change to twips for moving or changing the dimensions of text boxes.:D
 

Users who are viewing this thread

Back
Top Bottom