shellj
Technical User
- Sep 19, 2002
- 30
I have created a userform which consists of listboxes which hold information. Occassionally, it may be necessary to update these values so I have created an ini file to write data to. For example,
If lstAddValues.ListCount > 0 Then
lstValues.AddItem lstAddValues.List(0)
System.PrivateProfileString(FileName:="C:\My Documents\1638.ini", _
Section:=Section, Key:=lstValues.ListCount) = lstAddValues.List(0)
lstAddValues.RemoveItem (0)
End If
Because an unknown amount of data may be written to the ini file, I'm not sure how to read back all the data under a section heading without specifying the key name. In this case, I have just written all data out to the ini file as a numeric key depending on how many entries the user makes.
Can anyone help?!! I would be extremely grateful!
If lstAddValues.ListCount > 0 Then
lstValues.AddItem lstAddValues.List(0)
System.PrivateProfileString(FileName:="C:\My Documents\1638.ini", _
Section:=Section, Key:=lstValues.ListCount) = lstAddValues.List(0)
lstAddValues.RemoveItem (0)
End If
Because an unknown amount of data may be written to the ini file, I'm not sure how to read back all the data under a section heading without specifying the key name. In this case, I have just written all data out to the ini file as a numeric key depending on how many entries the user makes.
Can anyone help?!! I would be extremely grateful!