Solved

Dos environment

Posted on 2000-02-24
1
117 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

785 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