Access VBA Set Struing To %SYSTEMROOT%

Hi Experts,

How do I set the value of %SYSTEMROOT% to a VBA Variable?

I want WRK_APP_STD_INSTALL_DRIVE_001  to be the value of  %SYSTEMROOT%

The following code produces the Error 'Syntax Error'.

Dim WRK_APP_STD_INSTALL_DRIVE_001 As String
WRK_APP_STD_INSTALL_DRIVE_001 = %SYSTEMROOT%

Thanks,
Bob C.
Bob CollisonSystem ArchitectAsked:
Who is Participating?
 
als315Connect With a Mentor Commented:
Environ("SystemRoot")
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
The entire story his here (and more)

http://access.mvps.org/access/api/api0054.htm

mx
0
 
Bob CollisonSystem ArchitectAuthor Commented:
Hi Experts,

Thanks for both of the solutions.

Bob C.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.