Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

List of Environ expressions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Desert Piranha - 22 Feb 2006 00:22 GMT
Hi all,

Have Googled, helped and Microsofted, No joy.

Is there such a thing as list of the expressions used for the "Environ"
function?

IE:
'=Environ(UserName)
'=Environ(Path)
etc.

Signature

Desert Piranha

Steve Yandl - 22 Feb 2006 01:26 GMT
I don't know if this is complete but it should give you something to work
with.

ALLUSERSPROFILE
APPDATA
COLLECTIONID
CommonProgramFiles
ComputerName
ComSpec
FP_NO_HOST_CHECK
HMSERVER
HOMEDRIVE
HOMEPATH
ITEMID
LANG
LOGONSERVER
NUMBER_OF_PROCESSORS
OS
OSVER
Path
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
ProgramFiles
PROMPT
SESSIONID
SESSIONNAME
SWUTVER
SystemDrive
TEMP
TIMEOUT
TMP
TOOLPATH
tvdumpflags
UPDATEDIR
USERDOMAIN
USERNAME
USERPROFILE
VERSION
winbootdir
windir

Steve Yandl

> Hi all,
>
[quoted text clipped - 7 lines]
> '=Environ(Path)
> etc.
Tom Ogilvy - 22 Feb 2006 03:08 GMT
It depends on your operationg system.  You can get your list with

Sub ShowEnviron()
On Error Resume Next
For i = 1 To 100
 Cells(i, 1) = Environ(i)
Next

End Sub

Signature

Regards,
Tom Ogilvy

> Hi all,
>
[quoted text clipped - 7 lines]
> '=Environ(Path)
> etc.
NickHK - 22 Feb 2006 03:36 GMT
Tom,
Are these indices fixed across OSs ?
i.e. 1 always returns ALLUSERSPROFILE ?

NickHK

> It depends on your operationg system.  You can get your list with
>
[quoted text clipped - 20 lines]
> http://www.excelforum.com/member.php?action=getinfo&userid=28934
> > View this thread: http://www.excelforum.com/showthread.php?threadid=515140
Tom Ogilvy - 22 Feb 2006 04:20 GMT
Hey NickHK
I would think not, because I am using Windows 98SE and only have about 8
environment variables and they are numbered consecutively starting with 1.
ALLUSERSPROFILE isn't one of them.

TMP=C:\WINDOWS\TEMP
TEMP=C:\WINDOWS\TEMP
PROMPT=$p$g
winbootdir=C:\WINDOWS
PATH=C:\Program Files\Microsoft Office\Office;C:\WINDOWS;C:\WINDOWS\COMMAND
COMSPEC=C:\WINDOWS\COMMAND.COM
windir=C:\WINDOWS
BLASTER=A220 I5 D1 T4 P330

Recognize that you can define your own.
Signature

Regards,
Tom Ogilvy

> Tom,
> Are these indices fixed across OSs ?
[quoted text clipped - 31 lines]
> > > View this thread:
> http://www.excelforum.com/showthread.php?threadid=515140
NickHK - 22 Feb 2006 05:38 GMT
Tom,
OK, I suppose that makes sense.

NickHK

> Hey NickHK
> I would think not, because I am using Windows 98SE and only have about 8
[quoted text clipped - 47 lines]
> > > > View this thread:
> > http://www.excelforum.com/showthread.php?threadid=515140
keepITcool - 22 Feb 2006 08:56 GMT
it's the same list you get from the "Dos" Prompt
in a console window.

run     CMD.exe
type     SET [enter]

it's slightly different when you run COMMAND.com

Signature

keepITcool

| www.XLsupport.com | keepITcool chello nl | amsterdam

> Tom,
> OK, I suppose that makes sense.
>
> NickHK
Desert Piranha - 23 Feb 2006 02:32 GMT
Hi all,
Thank to everyone who contributed to this thread.

Tom, Kool little macro.

Thank you all
Dave

Tom Ogilvy Wrote:
> It depends on your operationg system.  You can get your list with
>
[quoted text clipped - 36 lines]
> > View this thread:
> http://www.excelforum.com/showthread.php?threadid=515140

Signature

Desert Piranha

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.