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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing text file into MSFlexgrid control

Status
Not open for further replies.

deetee2k

Programmer
Nov 25, 2000
90
IE
Hi,
I want to import each line of a file into an msflexgrid control and then separate the fields in the file according to whether it is tab/comma delimited. I have assigned each line in the file to an array entry 'lines(i)' and in the 'optComma_Click()' sub I have,

for i=1 to linecount
MSFlexgrid1.AddRows getLines(i)
next

...where 'getLines()' returns the array entry at 'i'. However this does nothing when I click the option control - any ideas what I'm doing wrong?

Appreciate any links/help on MSFlexGrid(not too much-want to figure this out myself!) it's a pain not having access to M$DN,

Ta!

D.
 
You can use the M$DN online at msdn.microsoft.com.

First off, I dont think there's a .AddRow method with MSFlexGrid. I assume you mean .AddItem.

Try the following:

MSFlexGrid1.AddItem strField1 & vbTab & strField2 & vbTab...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top