View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Computer Name with VBA

in case you need some code to show usage, maybe something like this:

Sub get_name()
Dim computername As String
computername = Environ("computername")
MsgBox computername
End Sub


--


Gary


"Eric" wrote in message
...
Hello,

I would like my macro to check the name of the computer before running.
How can I retrieve the computer name value through a macro?


Thank you.


Eric