I am using a INI file to save the configs of my software. I am getting this weird error when I am saving (writing) the configurations to the INI file.
I get the following error message:
Compile Error: ByRef argument type mismatch
Vb says that the error is with the following line:
VB Code:
WriteToINI "CLICKWHEEL", "Sensitivity", intSensitivity, strINILoc
with the intSensitivity part.VB Code:
'In a module Public Sub WriteToINI(strSectionName As String, strKeyName As String, strValue As String, strFileName As String) Dim WriteToIniResult As Long On Error GoTo ErrHandler WriteToIniResult = WritePrivateProfileString(strSectionName, strKeyName, strValue, strFileName) Exit Sub ErrHandler: Debug.Print Err.Description Err.Clear Resume Next End Sub
The variable is declared as public and contains either a 1 or 0.
I have a line before this one that writes a string to the INI file and it works fine, but I get an error with this line.
I am new to INI files... so any clue??
I already made a thread of this... but I accidently marked it resolved so I had to make a new thread... I don't know how to remove the resolved...
I shall reply tomorrow morning because I have to go to sleep now...





Reply With Quote