I have a problem reading multiple data from an INI file. I can read one no problem but I keep getting an Error13 if I try to read more than one. Any Help would be appreciated. The code I use in the form to read the single ini data is as follows:
Dim m_oReadINI As CReadINI
Dim sLocation As String
On Error GoTo Eh_FormLoad
Set m_oReadINI = New CReadINI
'set location of the INI file
sLocation = "C:HomeSettings.ini"
'pass info from CReadINI
.ININame = "C:HomeSettings.ini"
.Section = "Settings"
.Key = "RobotID"
txtRobotID.Text = .ReadINISettings
Set m_oReadINI = Nothing
Eh_FormLoad: ' If no INI file present or errors in INI file then alarm message appears.
Dim sMsg As String
sMsg = "Error Number: " & Err.Number & vbCrLf & _
"Error Description: " & Err.Description
MsgBox sMsg, vbCritical, "frmMain.FormLoad"
I want to be able to read multiple data from different keys etc from this code. How do I do this??