VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Retrieve the name of your Temporary directory with one line of code.

by Murali Bala (7 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 29th June 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Retrieve the name of your Temporary directory with one line of code.

Rate Retrieve the name of your Temporary directory with one line of code.



Retrieving the Name of the Temporary Directory
The ENVIRON statement in Visual Basic allows you to retrieve a string that is associated with a variable stored in the MS-DOS environment. The ENVIRON statement has the following syntax:
Environ [$](environmentstring)
'If you ask the ENVIRON statement to return a string associated with a variable that does not exist, an empty string will be returned.

'====COMMENT END==============

D = Environ$("TEMP")
MsgBox D

Download this snippet    Add to My Saved Code

Retrieve the name of your Temporary directory with one line of code. Comments

No comments have been posted about Retrieve the name of your Temporary directory with one line of code.. Why not be the first to post a comment about Retrieve the name of your Temporary directory with one line of code..

Post your comment

Subject:
Message:
0/1000 characters