Function test() As String
Dim ori As Range
On Error Resume Next
Set ori = Application.ThisCell
On Error GoTo 0
If ori Is Nothing Then
' appel depuis vba
Else
' appel depuis excel
Debug.Print ori.Address 'ref d'appel
Debug.Print ori.Parent.Name 'nom feuille d'appel
Debug.Print ori.Parent.Parent.Name 'nom classeur d'appel
End If
Set ori = Nothing
End Function