Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Win XP Logon Name

Ayone know how to reference a Win XP network user name from VBA?
Any pointers to required references etc gratefully received!

Cheers

Andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Win XP Logon Name

Hi Andy.

Try:

LName = Environ("UserName")


---
Regards,
Norman



"Andy Ives" wrote in message
...
Ayone know how to reference a Win XP network user name from VBA?
Any pointers to required references etc gratefully received!

Cheers

Andy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Win XP Logon Name

Thanks norman - works a treat.
I've just found Application.Username in the Excel Object Model and that
seems to work too

Cheers

Andy

"Norman Jones" wrote:

Hi Andy.

Try:

LName = Environ("UserName")


---
Regards,
Norman



"Andy Ives" wrote in message
...
Ayone know how to reference a Win XP network user name from VBA?
Any pointers to required references etc gratefully received!

Cheers

Andy




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Win XP Logon Name

Hi Andy,

I've just found Application.Username in the Excel Object Model and that
seems to work too


That returns the name inserted in:

Tools | Options | General | User Name.

This is the Excel user name and can freely be changed.

Environ("UserName") returns the Windows logon name.

---
Regards,
Norman



"Andy Ives" wrote in message
...
Thanks norman - works a treat.
I've just found Application.Username in the Excel Object Model and that
seems to work too

Cheers

Andy

"Norman Jones" wrote:

Hi Andy.

Try:

LName = Environ("UserName")


---
Regards,
Norman



"Andy Ives" wrote in message
...
Ayone know how to reference a Win XP network user name from VBA?
Any pointers to required references etc gratefully received!

Cheers

Andy






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
Logon Elindeo New Users to Excel 1 October 28th 07 12:44 PM
logon rww Excel Discussion (Misc queries) 0 November 18th 06 04:42 AM
Logon Screen mamun316 Excel Worksheet Functions 1 November 7th 05 07:27 PM
Logon information fl Excel Programming 1 June 21st 04 10:52 PM
NT Domain Logon Neil Excel Programming 0 November 4th 03 03:08 PM


All times are GMT +1. The time now is 04:22 AM.

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"