VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



gives the computer name you are working on

by Vineeth Venugopal (7 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 9th June 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

gives the computer name you are working on

Rate gives the computer name you are working on




Private Sub Command1_Click()
   Call Computer_Name
End Sub

Private Function Computer_Name() As String
   Dim nComputer As String 'Computer Name
   Dim nBuffer As String
   Dim nSize As Long
   nBuffer = Space$(250)
   nSize = Len(nBuffer)
   If GetComputerName(nBuffer, nSize) = 1 Then
      nComputer = Trim(nBuffer)
      MsgBox nComputer
      Exit Function
   End If
End Function




Download this snippet    Add to My Saved Code

gives the computer name you are working on Comments

No comments have been posted about gives the computer name you are working on. Why not be the first to post a comment about gives the computer name you are working on.

Post your comment

Subject:
Message:
0/1000 characters