-
Hi
I need to no how to read a text file with the following layout:
Interface Statistics
Received Sent
Bytes 89041265 361026
Unicast packets 2821 2645
Non-unicast packets 510634 137
Discards 0 0
Errors 0 0
Unknown protocols 178687
and then plot the details in a OLE microsoft graph.
Can anyone help please
Many Thanks
-
Code:
OPen file for input as #1
Line Input#1,InterfaceStat,ReceivedSent
Line Input#1,Unicast
Line INput#1,NonUnicast
Line Input#1,Discards
Line INput#1,Errors
Line INput#1,Unknownprotocols
close #1
Input them all as strings and use val and right functions to get the numeric value of them
-
Just go to www.vbworld.com and within the articles section there is one titled "Handling Files in Visual Basic". Anything you need should be in there.
-
not worked
i have tried what you have tried this but its not working i get an error on
Line Input#1,InterfaceStat,ReceivedSent
-
What error did you get? Have you tried to declare them as strings?