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:
WriteToINI "CLICKWHEEL", "Sensitivity", intSensitivity, strINILoc

with the intSensitivity part.

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??