#1
|
|||
|
|||
Computer Name
Is there a VBA function to return the computer name? |
#2
|
|||
|
|||
Answer
Application.Username will return the name of the PC
|
#3
|
|||
|
|||
Are you sure about that?
Or is it not the computer name that you really want? On my computer, In the vba Immediate window, these lines give three different results. Only one is the actual computer name. Code:
? Application.Username ? Environ$("username") ? Environ$("computername") |
#4
|
||||
|
||||
An alternative means to get the same results
Code:
Option Explicit Sub CompName() MsgBox (Application.UserName) MsgBox (Environ("username")) MsgBox (Environ("computername")) End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font and Format changes from computer to computer / device | FHANNAN87 | Outlook | 1 | 04-19-2017 03:28 PM |
New computer | RetamaRobert | Office | 3 | 03-25-2011 02:14 PM |
New Computer | Rayddd | Outlook | 1 | 01-13-2011 07:32 AM |
Should I buy new software for a new computer? | Balliol | Office | 1 | 12-27-2010 03:09 PM |
Computer Stolen-Install Office 2007 On New Computer | corndale | Office | 0 | 08-23-2010 09:52 AM |