Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim MyVariable
Sub Main
End Sub
Global MyVariable
Sub Main
End Sub
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" _
(ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, _
ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
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
Function ReadIniValue(strSection As String, strElement As String, strPath As String) As String
Dim iret As Long 'Return Code
Dim retStr As String * 30 'Return String -> Answer is in it
Dim strdisplay As String
iret = GetPrivateProfileString(strSection, strElement, "Default", retStr, 30, strPath)
ReadIniValue = retStr
End Function
Function WriteIniValue(strSection As String, strElement As String, strValue As String, strPath As String) As String
Dim iret As Long 'return code
iret = WritePrivateProfileString(strSection, strElement, strValue, strPath)
WriteIniValue = "Done"
End Function
Sub Main
[COLOR=red]
RC = WriteIniValue("UserInfo","UserName","John Doe","c:\YourNewIni.ini")
RC = WriteIniValue("UserInfo","UserPhone","1-800-000-0000","c:\YourNewIni.ini")
RC = ReadIniValue("UserInfo","UserName","c:\YourNewIni.ini")
msgbox "User Name is "+RC
RC = ReadIniValue("UserInfo","UserPhone","c:\YourNewIni.ini")
msgbox "User Phone is "+RC
[/color]
End Sub