Solved

Dos environment

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA: Add rows to listbox based on criteria 7 73
Vb.net 2008 2 56
Concatenate 2 userform comboboxes to a userform text box 4 56
VBA Shell can't Find Word document 11 76
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now