System Environment Variables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top