'Test' is a throw-away macro I wrote when I was investigating why some shapes would group when I didn't expect them to
You can delete the entire standard module
Option Explicit
Sub test()
Dim s As String
Dim S1 As Dimensions, S2 As Dimensions
With ActivePresentation.Slides(1)
S1 = GetDimensions(.Shapes("myShape1"))
S2 = GetDimensions(.Shapes("myShape2"))
s = "S1 Top = " & S1.Top & vbCrLf & "s1.Height = " & S1.Height & vbCrLf & "S2 Top = " & S2.Top & vbCrLf
s = s & "Gap = " & (S1.Top + S1.Height - S2.Top)
MsgBox s
End With
End Sub