Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Go Back  Xtreme Visual Basic Talk > > > Please help!!! {Reading numbers from text file}


Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2005, 06:40 AM
pilot20 pilot20 is offline
Newcomer
 
Join Date: Sep 2004
Posts: 1
Default Please help!!! {Reading numbers from text file}


This might be pretty basic to you all but please help me out. I need to make VB read lines of numbers from either a .txt file or an excel file and then put those numbers into an equation so that it will change a graphic (line). Basically, If there is a list of numbers (E.g 1-10) I need VB to read the numbers individually and use them to change the end point grid point of a line graphic. Please help me.
Thanking you for your reply.
Reply With Quote
  #2  
Old 01-30-2005, 07:39 AM
Iceplug's Avatar
IceplugPlease help!!! {Reading numbers from text file} Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Well, you start off by declaring a StreamReader to read the files:
Dim SR As StreamReader = New StreamReader("yourfile.txt")

SR.ReadLine() will read a line from the file. If the numbers are on separate lines, then this will be easy.
X = Integer.Parse(SR.ReadLine())
X is now the first number in the file.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 01-31-2005, 07:12 PM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Lightbulb

as of Iceplug.

if the X was a string..

Code:
Dim X as string 'If there is a seperator for the field thats is best e.g. ' 1-2-3-4-5-6-7-8-9-10 that sort of thing. 'you could do this Dim Info as string() info = X.split("-") 'Now the info is an array from 0 to how big the array is console.write("the information at 0 postion is: ",info(0))

this it to shed some light for you.

the pig..
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file} Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
 
Please help!!! {Reading numbers from text file}
Please help!!! {Reading numbers from text file}
 
-->