Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate FlexGrid with text file? 2

Status
Not open for further replies.

SIG357

Programmer
Jun 29, 2000
164
US
I want to display a fixed length text file using a FlexGrid.&nbsp;&nbsp;Is there an easy way to do this without opening up the file and looping through it, setting the test for each cell individually?<br><br>Thanks for any help<br>Joe
 
You can load the flexgrid all in one go - but you do have to read the file first.<br><br>Read the file a line at a time.<br><br>As you read it build a string that contains the whole file. <br><br>Seperate columns with vbTab and rows with vbCrLf.<br><br>When you've read the whole file you can add it to the grid in one operation with .Additem<br><br>I hope this is of use to you. <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Thanks Mike,<br>Thanks just what I was looking for<br><br>Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top