Thread: name
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default name

Sub ComputerName()
Dim sComputer As String
Dim cComputer As Long
sComputer = String(255, " ")
cComputer = 255
GetComputerName sComputer, cComputer
sComputer = Left(sComputer, cComputer)
MsgBox "Computer name is: " & sComputer
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mark" wrote in message
...
I know code Application.UserName
How do i get name of PC?
Regards
Mark