Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Office XP compatiblity- Signed in user

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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office End-User License Agreement Dom Excel Discussion (Misc queries) 8 March 24th 08 02:35 PM
Setting Office 2007 User Name Matt Excel Discussion (Misc queries) 1 January 17th 08 02:11 AM
Workbook Created By Signed Addin Is Itself Not Signed willhandley Excel Discussion (Misc queries) 0 November 5th 06 06:53 PM
2003 to 2000 CSV compatiblity issues Johny B Excel Discussion (Misc queries) 4 October 12th 06 11:19 PM
Help me help a user in our office Bruce Excel Worksheet Functions 5 December 7th 05 04:49 PM


All times are GMT +1. The time now is 07:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"