Solved

Dos environment

Posted on 2000-02-24
1
119 Views
Last Modified: 2010-05-02
can anyone help! i want to display a list of environment variables

thanx, krakyn
0
Comment
Question by:Krakyn
1 Comment
 
LVL 32

Accepted Solution

by:
Erick37 earned 100 total points
ID: 2555689
Private Sub Command1_Click()
    Dim i As Integer
    Dim sEnv As String
    Dim sEnvV As String
    Do
        i = i + 1
        sEnv = Environ(i)
        If Len(sEnv) = 0 Then Exit Sub
        'Get the environ name
        sEnvV = Left(sEnv, InStr(1, sEnv, "=") - 1)
        sEnv = Environ(sEnvV) 'Get the setting
        'List them
        List1.AddItem sEnvV & " = " & sEnv 'Each setting added to a listbox
    Loop
End Sub
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question