S
scubaguy_357
The following function worked fine in my previous version of Excel but does
not work in XP. It tries to retrieve the logged in user. Thanks for the help!
Private Declare Function GetUserName Lib "advapi32.dll"_
Alias "GetUserNameA" (ByVal lpBuffer As String, nSize as Long)_
As Long
Funtion UserName() As String
Dim Buffer as String * 100
Dim BuffLen as Long
BuffLen=100
GetUserName Buffer, BuffLen
UserName= Left(Buffer, BuffLen - 1)
End Function
'The error I get is "Compile error- can't find project or library"
Thanks for any help you can give.
not work in XP. It tries to retrieve the logged in user. Thanks for the help!
Private Declare Function GetUserName Lib "advapi32.dll"_
Alias "GetUserNameA" (ByVal lpBuffer As String, nSize as Long)_
As Long
Funtion UserName() As String
Dim Buffer as String * 100
Dim BuffLen as Long
BuffLen=100
GetUserName Buffer, BuffLen
UserName= Left(Buffer, BuffLen - 1)
End Function
'The error I get is "Compile error- can't find project or library"
Thanks for any help you can give.