bonjour,
une proposition de fonction, avec un exemple d'appel
Sub test()
x1 = 10
y1 = 10
x2 = 20
y2 = 10
v1 = Array(x1, y1)
v2 = Array(x2, y2)
r = subvecteur(v1, v2)
MsgBox r(LBound(r)) & "," & r(UBound(r))
End Sub
Function subvecteur(v1 As Variant, v2 As Variant) As Variant
Dim s(1 To 2)
s(1) = v1(LBound(v1)) - v2(LBound(v2))
s(2) = v1(UBound(v1)) - v2(UBound(v2))
subvecteur = s
End Function