Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.misc > #283

Re: Environment variables in Visual Basic (Vb5E, W7/64)

From Helge <w4h@nurfuerspam.de>
Newsgroups comp.lang.basic.misc
Subject Re: Environment variables in Visual Basic (Vb5E, W7/64)
Date 2012-06-26 09:59 +0200
Organization albasani.net
Message-ID <op.wgh25xmn3zwgbm@w7-pc> (permalink)
References <op.wggsfgtr3zwgbm@w7-pc> <ni1hu799q84b2tjpoboojui59glmpib2gr@4ax.com> <XnsA07D73035D4A1auricauricauricauric@88.198.244.100>

Show all headers | View raw


Am 25.06.2012, 20:17 Uhr, schrieb Auric__ <not.my.real@email.address>:

> ralph wrote:
>
>> On Mon, 25 Jun 2012 17:10:18 +0200, Helge <w4h@nurfuerspam.de> wrote:
>>
>>> Hallo NG!
>>> I need to open PathA = "%USERPROFILE%\Documents\paper\pp.csv"
>>>           Open PathA for Output as #FiNu
>>> But it does not work that easy. Any ideas? Thanks!
>>
>> The "%" delimiters are for use with shells. At the command line, in
>> batch files, Windows Shells (Explorer) etc.
>>
>> In VB use the Environ() function without the delimiters.
>> Dim sRoot As String : sRoot = Environ("userprofile")
>> PathA = PathA = sRoot & "\Documents\paper\pp.csv"
>
> No real need for the extra string:
>
>   PathA = Environ("userprofile") & "\Documents\paper\pp.csv"
>

Thanks! That's it.
-- 
Helge, DJ1WM

Back to comp.lang.basic.misc | Previous | NextPrevious in thread | Find similar


Thread

Environment variables in Visual Basic (Vb5E, W7/64) Helge <w4h@nurfuerspam.de> - 2012-06-25 17:10 +0200
  Re: Environment variables in Visual Basic (Vb5E, W7/64) ralph <nt_consulting64@yahoo.com> - 2012-06-25 10:43 -0500
    Re: Environment variables in Visual Basic (Vb5E, W7/64) "Auric__" <not.my.real@email.address> - 2012-06-25 18:17 +0000
      Re: Environment variables in Visual Basic (Vb5E, W7/64) Helge <w4h@nurfuerspam.de> - 2012-06-26 09:59 +0200

csiph-web