Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Flexgrid anyone?


Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2003, 01:29 AM
ThadNZ ThadNZ is offline
Regular
 
Join Date: Jun 2003
Location: NZ
Posts: 50
Default Flexgrid anyone?


I am trying to loop through my data in a txtfile to add t to my flexgrid.

Can anyone suggest a method in the attached code on how to do it as an array so it will add a row and the data as long as there s data in the file?

I want it to add enough rows that it reaches EOF and then stop. The colum width is always the saem (5).

Can anyone help me? i'm a bit new to this, if anyone an edit my code i'd be so very appreciative



Cheers
B

-----------------------Code----------------------------------
Private Sub loadfields()
On Error GoTo Handler
'Dim variables as string
Dim Id As String
Dim Sitename As String

site = lblsitename.Caption

'Open site bankings file
Open App.Path & "\" & site & "\data\bankings.dat" For Input As #1

Do While Not EOF(1)

'reads the data from the file named "bankings.dat" as seen in the form load
Input #1, Id, Sitename
Close #1 'closes the file


msf1.Row = i
msf1.Col = 0
msf1.Text = "Date Banked"

msf1.Row = 1
msf1.Col = 0
msf1.Text = Id

msf1.Row = 0
msf1.Col = 1
msf1.Text = "Calculated"

msf1.Row = 0
msf1.Col = 2
msf1.Text = "Actual"


msf1.Row = 0
msf1.Col = 3
msf1.Text = "Statement Number"

msf1.Row = 0
msf1.Col = 4
msf1.Text = "Over / Under"


Loop
Close #1

Exit Sub
Handler:
LogError Err.number, Err.Description, Me.Name, "Loadfields"
End Sub

------------------------End Code------------------------------------
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
One Flexgrid depending on another millennm Database and Reporting 0 02-25-2003 06:00 PM
FlexGrid Auto Scrolling shadowrun General 3 01-29-2003 07:46 PM
FlexGrid problem fizbim General 12 09-27-2002 12:41 PM
Passing a FlexGrid to a Procedure VBtaylor General 2 06-03-2002 03:48 PM

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
 
 
-->