Christineeve
Programmer
Here is my code. In my IDE, "Left" appears as a Property and Integer, where "Mid" appears as Function is a String. Which it should be. I'm trying to figure out how can I find out why this Left is set as a Public Property.
I don't know how to find it and fix it. I know it's a stupid question, but I'm stuck on this. I appreciate your help.
I don't know how to find it and fix it. I know it's a stupid question, but I'm stuck on this. I appreciate your help.
Code:
Private Sub ReturnEnvironVarbls()
Dim thePath As String = My.Application.GetEnvironmentVariable("Path")
Dim myVariable As String = Environ("Path")
Dim Counter As Integer
Dim FullVariable As String
Dim namePart As String
Dim ValuePart As String
Dim equalsPosition As Integer
For Counter = 1 To 255
FullVariable = Environ(Counter)
If (FullVariable = "") Then Exit For
equalsPosition = InStr(FullVariable, "=")
If (equalsPosition > 0) Then
[b] namePart = Left(FullVariable, equalsPosition - 1)[/b]
ValuePart = Mid(FullVariable, equalsPosition + 1)
End If
Next Counter
End Sub