Bonjour et merci pour la piste :
j'ai résolu le problème comme suit :
Function ExcelBitsX() As Boolean
On Error GoTo MsgErreur
#If VBA7 And Win64 Then
ExcelBitsX = True
MsgBox ("Excel 64 Bits")
Range("TypeExcel") = "64"
#Else
ExcelBitsX = False
MsgBox ("Excel 32 Bits")
Range("TypeExcel") = "32"
Exit Function
#End If
MsgErreur:
MsgBox Err.Description
End Function