System Environment Variables

B

bdickert

is there a way to use the SET/System Environment Variables in a spreadsheet?
If yes, please explain. If no, just respond with a no.

Thanks in advance.

BD
 
S

smw226

Hi BD

Paste the following code into a Module:

Public Function envr_user(envr_var As String)
envr_user = Environ(envr_var)
End Function

The enter the below in any cell changing the variable as appropriate:
=envr_user("username")

Thanks,

Simon
 
Top