Solved

Dos environment

Posted on 2000-02-24
1
114 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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

16 Experts available now in Live!

Get 1:1 Help Now