How To Write To a INI File
This VERY Simple 5 Line Code Writes To a INI File! Enjoy!
Assumes
Place a Command Button on The Form, Name it Command1. Put The 1 Declaration in a Module. Have Fun!
API Declarations
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
Rate How To Write To a INI File
(2(2 Vote))
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
'Have Fun!
How To Write To a INI File Comments
No comments yet — be the first to post one!
Post a Comment