Private Sub Command1_Click()
Dim buf As String, msg As String, idx As Integer
idx = 1
Do
buf = Environ(idx)
msg = msg & buf & vbCrLf
idx = idx + 1
Loop Until buf = ""
MsgBox msg
End Sub
Dim buf As String, msg As String, idx As Integer
idx = 1
Do
buf = Environ(idx)
msg = msg & buf & vbCrLf
idx = idx + 1
Loop Until buf = ""
MsgBox msg
End Sub