How to Center align a Control on form
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 | 'Controls - How to Center align a Control on form Option Explicit 'Add a CommandButton to your form. Private Sub Command1_Click() Command1.Left = (Form1.Width - Command1.Width) / 2 Command1.Top = (Form1.Height / 2 - Command1.Height) End Sub |