ini / text file data manipulation

Glenvn
09-29-2009, 07:43 AM
Dear All,

I have an ini (text file) that looks like this:

[BLPMLInfo]
BLPVol=675
[Fowl Typhoid - Only edit IF you are a 100 % sure of yourself]

[List]
Count=5

[Target PCV]
C:1=5 %
C:2=5 %
C:3=5.0 %
C:4=4.0 %
C:5=4.0 %


I have the following code but it only targets one key:

=========================================================
Dim sSetting2 As String

Private Sub Command1_Click()

sSetting2 = GetINISetting("Target PCV", "C:2", App.Path & "\logfiles\FowlTyphoidLog.txt")

sSetting2 = left$(sSetting2, 2) ' trim value with 2

Text1.Text = sSetting2 ' Gives me the value 5
==========================================================

I need to average this data (C:1 to C:5) and display it in a textbox.

I need some advice/ help on how to handle this....

TIA

Glenvn
10-01-2009, 06:09 AM
Never mind! I have figured it out!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum