how to get the center point of a face

i want to get the center point of the face i have selected, i use the api"GetMassProperties", but it doesn't work and stop in this sentence,"Mass = myNote.GetMassProperties(1)", please help me, thank you!

the code:

Sub main()
Dim swApp As Object
Dim Part As Object

Dim myNote As
Dim Mass As Variant

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set myNote = Part.SelectionManager.GetSelectedObject5(1)
Mass = myNote.GetMassProperties(1)          'it doesn't work when it runs"

End Sub

SolidworksApi macros