Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    using VBA to access varibles from DOS

    hi ya

    does anyone know how, have code, that by using VBA, reading & accessing variable fields setup in DOS.
    TIA Diana

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: using VBA to access varibles from DOS

    Are you trying to access environment variables, such as what you set up in config.sys or autoexec.bat? I'm not aware of any VBA way to access those, but there might be a Windows API call.

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using VBA to access varibles from DOS

    What "variable fields" are you talking about? If you are trying to access the DOS Environment variables, then you need to use the Windows API function:

    <pre>Public Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" _
    (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long
    </pre>



    *** Geoff W- split long line in "pre" tag ***
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •