Everytime i try and run my project i get an error message saying error 75, Error File/Path access, or something like tht, anyways it highlights the code which is this:
Code:
Open iniPath For Append As #1 'if the file doesn't exist... it will in a minute.
Close #1 'it exists now.
Now when i hover my cursor over iniPath it has a little tip box display saying iniPath = "" and i've looked through all my code and there is no where this is defined. or anything like tht, how do i fix it basically. the full code is here:
Code:
Function GetINIData(ByVal iniSection As String, ByVal iniSetting As String, ByVal iniDefault As String, ByVal iniPath As String) As String
Dim tmpIncoming As String
If iniSection = "" Or iniSetting = "" Then Exit Function
Open iniPath For Append As #1 'if the file doesn't exist... it will in a minute.
Close #1 'it exists now.
Open iniPath For Input As #1 'and so we can open it :D
Do Until EOF(1)
Input #1, tmpIncoming
If LCase(tmpIncoming) = "[" & LCase(iniSection) & "]" Then
Do Until EOF(1)
Input #1, tmpIncoming
If Left(tmpIncoming, 1) = "[" Then
Exit Do
ElseIf Left(LCase(tmpIncoming), Len(iniSetting) + 1) = LCase(iniSetting) & "=" Then
GetINIData = Right(tmpIncoming, Len(tmpIncoming) - (Len(iniSetting) + 1))
End If
Loop
Exit Do
End If
Loop
If GetINIData = "" Then GetINIData = iniDefault
Close #1
End Function
thnx in advance for any help
------------------------------------------------
Apocolypse2005
Always ready and waiting to be helped!