Get Computer Name

D

David Kennedy

Hi,

Does anyone know the code to get your computers name using VBA?

Thanks,
David
 
R

RJ

Hi David,

The Environ command returns a great number of local type variables including
the computer name.

MyComputer = Environ("Computername")

Cheers,
RJ
 
Top