Application.UserName Equivalent in MS Access

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,304
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Does anyone have VBA code that I can use in MS Access that provides the same data as Application.UserName as used in MS Excel?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
OK thanks Kyle123. I obviously didn't appreciate what the AD was.
 
Upvote 0
This gave the same as Environ("USERNAME") i.e. my first name only.

The value does appear in the registry i.e. "HKEY_CURRENT_USER\Software\Microsoft\Office\Common\UserInfo\UserName"
 
Upvote 0
clarification -
It USED to be true that Excel returned "whatever you typed in when you installed it - could be anything" in response to Application.Username
However, with the advent of 365 and corporate accounts, it's also true that anyone on a corporate 365 account likely didn't type anything in when they installed it, and quite probably Application.Username will return their full name. Depending, of course, on the corporate/user account settings for the Enterprise 365 set up.
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,361
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top