Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
查找ini文件
If Dir(App.Path & "\dbcredit.ini") = "" Then
msgbox ""
end if
新建ini文件
Open App.Path & "\dbcredit.ini" For Output As #1
Print #1, "This is a test" ' 将文本数据写入文件
打开文件
Open App.Path & "\mscredit.ini" For Input As #1
Input #1, ms
Close #1
看看对你有没有帮助