Hi!
A problem I never expected has occured...
I am using excel 2003. In my application i create .ini files and read them on occasion.
Now Im trying to connect my application via API to another program. In order to access that programs api I added that programs reference library. BUT this is when my problems started.
The function i use to read my .ini files stopped working.
It has to do with the row second from the bottom. The word left is somehow causing it to crash. My error message is: "Wrong number of arguments or invalid property definition".
Once i remove the reference problem disappears?
How should I go by to solve this?
A problem I never expected has occured...
I am using excel 2003. In my application i create .ini files and read them on occasion.
Now Im trying to connect my application via API to another program. In order to access that programs api I added that programs reference library. BUT this is when my problems started.
The function i use to read my .ini files stopped working.
It has to do with the row second from the bottom. The word left is somehow causing it to crash. My error message is: "Wrong number of arguments or invalid property definition".
Once i remove the reference problem disappears?
How should I go by to solve this?
Code:
GetPrivateProfileString32 = Left(strReturnString, lngValid)
Code:
Function GetPrivateProfileString32(ByVal strFileName As String, _
ByVal strSection As String, ByVal strKey As String, _
Optional strDefault) As String
Dim strReturnString As String, lngSize As Long, lngValid As Long
On Error Resume Next
If IsMissing(strDefault) Then strDefault = ""
strReturnString = Space(1024)
lngSize = Len(strReturnString)
lngValid = GetPrivateProfileStringA(strSection, strKey, _
strDefault, strReturnString, lngSize, strFileName)
GetPrivateProfileString32 = Left(strReturnString, lngValid)
On Error GoTo 0
End Function