' Déclaration de la fonction Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" ( ByVal lpBuffer As String, nSize As Long) As Long Public Function ComputerName() As String ' Retourne le nom de l'ordinateur Dim stTmp As String, lgTmp As Long stTmp = Space$(250) lgTmp = 251 Call GetComputerName(stTmp, lgTmp) ComputerName = Split(stTmp, Chr$(0))(0) End Function