08-22-2012، 06:51 PM
سـلام دوستان یه مثال جالب برای Environ دیدم گفتم بزارم شاید بکار بقیه هم بیاد!

کد:
Private Sub Command1_Click()
Dim x As Long, v As String
'------------------------------------------------------------
' Get the first Environ Variable
'------------------------------------------------------------
x = 1
v = "" & Environ(x)
'------------------------------------------------------------
' Loop until there are no more variables
'------------------------------------------------------------
While v <> ""
'------------------------------------------------------------
' Output the value
'------------------------------------------------------------
List1.AddItem v
'------------------------------------------------------------
' Get the next value
'------------------------------------------------------------
x = x + 1
v = "" & Environ(x)
Wend
End Sub
