Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
sharing excel sheet with multiple users, but other users cant see lana.b Excel Discussion (Misc queries) 3 January 25th 09 11:15 AM
SAS users please help arizona302 Excel Discussion (Misc queries) 0 May 16th 06 05:22 PM
new users STEVE MAL via OfficeKB.com New Users to Excel 2 September 24th 05 02:49 PM
prevent users from overwriting other users data [email protected] Excel Worksheet Functions 0 April 17th 05 08:18 PM
Help - Automating a file.. Adding Users , Deleting users, Changing Tim Harding Excel Worksheet Functions 0 March 16th 05 01:25 PM


All times are GMT +1. The time now is 02:13 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"