Hi im trying to load an Object well reading a file, But the code is not working I have used it several times but this time I am getting an error message "Invalid use of Property" and it is highlighting the 'Load' Function
Private Sub Terrain_Load()
Dim intFileNum As Integer
Dim strTextLine As String
Dim Xval As Boolean
intFileNum = FreeFile
Open DirSave & "\Tree.czmap" For Input As #intFileNum
Do While Not EOF(intFileNum)
Line Input #intFileNum, strTextLine
If Mid(strTextLine, 1, 4) = "Load" Then
Load imgTree(imgTree.UBound + 1)
imgTree(imgTree.UBound).Visible = True
imgTree(imgTree.UBound).Picture = LoadPicture(App.Path & "\Pictures\Landscape\1.gif")
Xval = True
ElseIf Xval Then
imgTree(imgTree.UBound).Left = strTextLine
Xval = False
Else
imgTree(imgTree.UBound).Top = strTextLine
End If
Loop
Close #intFileNum
End Sub