You take the width and height of the mainform and the width and height of the object you want to centralise and subtract one from the other and divide by two.
Sub Centralise(CenterThis as object, InThisForm as object)
CenterThis.left = (InThisForm.Width - CenterThis.Width) / 2
CenterThis.top = (InThisForm.Height - CenterThis.Height) / 2
End Sub