Centre

benheaven

Registered User.
Local time
Today, 19:47
Joined
Aug 1, 2003
Messages
18
Hello,

Is there any coding that i can use to make all of my forms align in the centre of the screen. Without going through every form selecting centre as all of my forms when selected appear half on and half the screen?

Thanks
Ben
 
go to the properties of your form, and set the property Auto Centre to yes
 
yes but ive got so many is there any other way?
 
This will work for each form that is open in form or design view.

Dim i
For i = 0 To Application.Forms.count - 1
Debug.Print Application.Forms(i).Name
Application.Forms(i).AutoCenter = True
Next i

Just dont spend 2 hours trying to find a shortcut for a 1 hour task
 
Place this code in a module and run it. But I think you need the forms open for it to work.

Code:
Public Sub setAutoCentre()
'-----------------------------------------------------------------------
' Purpose   : This sub routine will set the AutoCenter value to True for
'             all forms open in Design View or Form View Modes.
' Author    : Todd Dzur.  16/02/2005
'  ** Not tested **
'------------------------------------------------------------------------
    Dim i
    For i = 0 To Application.Forms.count - 1
        Debug.Print Application.Forms(i).Name
        Application.Forms(i).AutoCenter = True
    Next i
End Sub
 

Users who are viewing this thread

Back
Top Bottom