HOW TO

Read an environment variable using VBA

Last Published: April 25, 2020

Summary

This article shows how to get the value for an environment variable into an ArcMap VBA project.

Procedure



Use the Environ function to return the string associated with the specified environment variable. For example:

Code:
MsgBox Environ("ARCHOME")

Article ID:000004868

Software:
  • ArcMap 8 x
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic