Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 13, 7:31*am, Dave Peterson wrote:
The environment variable would be alive as long as the Shell is alive--but it's limited to that shell and its children. So if you need to run a .bat file that needs an environment variable, you could shell to a different .bat file that sets the environment variable and then runs the .bat file that you need to run. But if you want to change the environment variable globally, it's a different story. * Win95 came with command called WinSet that did this. *But I don't see it in WinXP (at least in a normal install). But you could search google looking for alternatives. I've never used this, but it looks interesting:http://www.codeguru.com/cpp/w-p/win3...le.php/c10849/ .... Dave Peterson- Hide quoted text - - Show quoted text - Dave, I tried the following, but in the command prompt window it said: '%chris%' is not recognized as an internal or external command, operable program or batch file. Chris Sub test6() Dim count As Long Dim ev_result As String Row = 30 count = 0 ev_result = Wait_("cmd /k set chris=""1 2 3"" & %chris%", "", False, True) ev_result = Environ("chris") Debug.Print "--- " & ev_result & " <---" Debug.Print "end" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using environment variable in macropath | Excel Programming | |||
Environment Variable Names | Excel Programming | |||
Can you set a Window's Environment variable in VB | Excel Programming | |||
Environment Variable | Excel Programming | |||
How can I invoke windows environment variable in excel | Excel Programming |