If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Username Query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-23-04, 15:51
redma_d redma_d is offline
Registered User
 
Join Date: Jan 2004
Location: Newcastle UK
Posts: 10
Username Query

Is there a way to capture the pc username instead of using application.username?

(The PCs in question are installed with NT4 or XP Pro and Excel 97 - lowest version)

Many thanks in advance

Reply With Quote
  #2 (permalink)  
Old 02-23-04, 17:50
Smitty Smitty is offline
Registered User
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 153
How about:
Code:
Sub GetMyName()
    Dim CurrentUserName As String
        CurrentUserName = Environ("Username")
    MsgBox CurrentUserName
End Sub
Hope that helps,

Smitty
Reply With Quote
  #3 (permalink)  
Old 02-23-04, 18:56
redma_d redma_d is offline
Registered User
 
Join Date: Jan 2004
Location: Newcastle UK
Posts: 10
Smashin ... i knew there must be an easy answer to it ...

Cheers

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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