View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default How do I use environment variables in Excel?

Why do you expect Excel to have the same syntax as Unix? That is just
perverse

EnvString = Environ(Indx)

where indx can be the index number of the value, such as Term

--
HTH

-------

Bob Phillips
"kfloyd" wrote in message
...
I've defined some environment variables that I want to use to specify a

path
to a directory. How do I use these environment variables in the "Save As"
box?

The variables a

"ADCmath" set to "P:\blah"
"TERM" set to "Fall2004"

I want to save an Excel file in the directory P:\blah\Fall2004 by using
%ADCmath%\%TERM%\filename.xls

but it doesn't work.

(And how can something so simple in UNIX be so obtuse in Windows???)

Ken