ALARM= ALARM1
ZONE= ZONE6
DESCRIPTION= NEED TO REPLACE
ALARM= ALARM5
ZONE= ZONE5
DESCRIPTION= OK FOR 2 YEAR
ALARM= ALARM9
ZONE= ZONE7
DESCRIPTION= NEED MAINTANENCE
When textfile contain "ALARM=" i can load alarm name to listbox with the code below and display
ALARM1
ALARM5
ALARM9 on the listbox
'+++++++++++++++++++++++++
Private Sub Command1_Click()
nFileNum = FreeFile
Open "C:\3.txt" For Input As nFileNum
lLineCount = 1
Do While Not EOF(nFileNum)
Line Input #nFileNum, sNextLine
sNextLine = sNextLine & vbCrLf
sText = sNextLine
If InStr(sText, "ALARM=") = 1 Then
List1.AddItem (Mid(sText, 7, (Len(sText) - 7)))
End If
Loop
Close nFileNum
End Sub
'++++++++++++++++++
What i want now is this function
Private Sub List1_Click()
text1.text= ?????????
End Sub
I mean ,when i click ALARM1 on list item i want to display
ALARM= ALARM1
ZONE= ZONE6
DESCRIPTION= NEED TO REPLACE
When i click ALARM9 on list item i want to display
ALARM= ALARM9
ZONE= ZONE7
DESCRIPTION= NEED MAINTANENCE
And so on, there is one space line between these group.
I have attach my sample project. That will be great if anyone can find the solution.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.