Declare Function WritePrivateProfileString Lib "kernel32" _
Alias "WritePrivateProfileStringA" (ByVal lpApplicationName _ As String, ByVal lpKeyName As Any, ByVal lpString As Any, _ ByVal lpFileName As String) As Long Public Sub iniWrite(sFileName As String, sKey As String, _ sSection As String, ByVal sValue As String) Dim iW As String iW = WritePrivateProfileString(sSection, sKey, sValue, sFileName) End Sub Private Sub Command1_Click() iniWrite "C:\Windows\Desktop\File.ini", "Neat", "Pretty", "Huh?" End Sub |