Solved

Dos environment

Posted on 2000-02-24
1
123 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month4 days, 2 hours left to enroll

630 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