Try to import the function. try code below:
' Information functions: get a connection name, and the current user/computer name
Private Declare Function GetComputerName Lib "Kernel32" Alias "GetComputerNameA" _
(ByVal lpBuffer As String, nSize As Long) As Integer
ublic Function acbGetUser(Optional varErr As Variant) As String
' Get the name of the current network user
Dim strBuffer As String
Dim lngRetval As Long
Dim lngSize As Long
' Pick an arbitrarysize to start with. See comments
' in acbGetConnection to see how this all works.
lngSize = conMaxPath
Do
strBuffer = Space(lngSize)
lngRetval = WNetGetUser(0&, strBuffer, lngSize)
Loop Until lngRetval <> ERROR_MORE_DATA
If lngRetval <> NO_ERROR Then
acbGetUser = ""
Else
acbGetUser = TrimNull(strBuffer)
End If
varErr = lngRetval
End Function