Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Users Name
Hi all I've used a bit of code from the M$ site that grabs the users name using a windows API The code is from here http://support.microsoft.com/?kbid=161394 There are about 10 people who all use this spreadsheet and everything works fine, but on 1 PC it does not get the user name and it doesn't matter who logs in Has anyone else used that bit of code before, and seen this happen. All it seems to do it leave the Var LpName with 256 spaces and no name. -- fastmonkey512 ------------------------------------------------------------------------ fastmonkey512's Profile: http://www.excelforum.com/member.php...o&userid=23982 View this thread: http://www.excelforum.com/showthread...hreadid=511253 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Users Name
I use this:
http://www.mvps.org/access/api/api0008.htm No problems experienced yet but, it is a tad s-l-o-w. "fastmonkey512" wrote in message news:fastmonkey512.231esm_1139614802.2992@excelfor um-nospam.com... Hi all I've used a bit of code from the M$ site that grabs the users name using a windows API The code is from here http://support.microsoft.com/?kbid=161394 There are about 10 people who all use this spreadsheet and everything works fine, but on 1 PC it does not get the user name and it doesn't matter who logs in Has anyone else used that bit of code before, and seen this happen. All it seems to do it leave the Var LpName with 256 spaces and no name. -- fastmonkey512 ------------------------------------------------------------------------ fastmonkey512's Profile: http://www.excelforum.com/member.php...o&userid=23982 View this thread: http://www.excelforum.com/showthread...hreadid=511253 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Users Name
Have you tried using environ("UserName") something like this (instead of the
API) msgbox environ("UserName") Not to sure why the API would fail but it would have more to do with the Operating system than Excel... -- HTH... Jim Thomlinson "fastmonkey512" wrote: Hi all I've used a bit of code from the M$ site that grabs the users name using a windows API The code is from here http://support.microsoft.com/?kbid=161394 There are about 10 people who all use this spreadsheet and everything works fine, but on 1 PC it does not get the user name and it doesn't matter who logs in Has anyone else used that bit of code before, and seen this happen. All it seems to do it leave the Var LpName with 256 spaces and no name. -- fastmonkey512 ------------------------------------------------------------------------ fastmonkey512's Profile: http://www.excelforum.com/member.php...o&userid=23982 View this thread: http://www.excelforum.com/showthread...hreadid=511253 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Users Name
Cheers guy's I'll give them both a try when I back at work. If I ever figure why the API doesn't work on this one PC I'll post it here (but don't hold your breath) Colin -- fastmonkey512 ------------------------------------------------------------------------ fastmonkey512's Profile: http://www.excelforum.com/member.php...o&userid=23982 View this thread: http://www.excelforum.com/showthread...hreadid=511253 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sharing excel sheet with multiple users, but other users cant see | Excel Discussion (Misc queries) | |||
SAS users please help | Excel Discussion (Misc queries) | |||
new users | New Users to Excel | |||
prevent users from overwriting other users data | Excel Worksheet Functions | |||
Help - Automating a file.. Adding Users , Deleting users, Changing | Excel Worksheet Functions |