Retrieves Computer Name/ID You Will Need 1 Command Button
Retrieves Computer Name/ID You Will Need 1 Command Button
API Declarations
Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Rate Retrieves Computer Name/ID You Will Need 1 Command Button
(1(1 Vote))
Dim strBuffer As String
Dim lngBufSize As Long
Dim lngStatus As Long
lngBufSize = 255
strBuffer = String$(lngBufSize, " ")
lngStatus = GetComputerName(strBuffer, lngBufSize)
If lngStatus <> 0 Then
MsgBox ("Computer name is: " & Left(strBuffer, lngBufSize))
End If
End Sub
Retrieves Computer Name/ID You Will Need 1 Command Button Comments
No comments yet — be the first to post one!
Post a Comment