ciao ho un file txt, quella di seguito è la parte di file che devo prendere in considerazione, non capita sempre nella stessa riga:
DMI Memory Device
-----------------
designation DIMM 1
format SODIMM
type unknown
total width 64 bits
data width 64 bits
size 1024 MBytes
DMI Memory Device
-----------------
designation DIMM 2
format SODIMM
type unknown
io devo solamente dire al programma "QUANDO LA PARTE RIFERITA A DIMM 2 NON MOSTRA "size" allora msgbox "dimm mancante", viceversa dimm msgbox dimm "ok".
Io avevo iniziato così: (il tutto accade premendo un pulsante):
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim FileName As String
Dim fso, f
Dim Read As String
Dim Found As Boolean
Found = False
FileName = "C:\database\prova.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(FileName, ForReading)
Do While f.AtEndOfStream = False
Read = f.ReadLine
If Read = "DMI Memory Device" Then
Found = True
End If
il mio problema è andare a beccare la presenza di "size" di "DMi Memory Device" di "DIMM 2".
ciao&grazie1000