Have a look at my code pls
Take a peek
Can anybody tell me how hopeless my attempt at this is? Is my code even close to doing what I want it to? I'm trying to graph a single line ( latitude vs. time ) the (x,y) coordinates are stored in two very large text files. Here is my code:
code:--------------------------------------------------------------------------------
Private Sub cmdGraphB_Click()
Dim tmp1 As String
Dim tmp2 As String
Dim timeCtr As Long
dim i as Long
Dim the_time As Double
Dim the_latitude As Double
Dim Values() As Single
Dim NumPoints As Integer
Open "C:\Unzip Next Step\R1 Files\R1Time.txt" For Input As #1
Open "C:\Unzip Next Step\R1 Files\R1Latitude.txt" For Input As #2
timeCtr = 0
Do While Not EOF(1)
Line Input #1, tmp1
tmp1 = CLng(tmp1)
timeCtr = timeCtr + 1
Line Input #2, tmp2
tmp2 = CLng(tmp2)
the_latitude = tmp2
Values(i, 1) = timeCtr
Values(i, 2) = the_latitude
Loop
Close #2
Close #1
MSChart1.chartType = VtChChartType2dXY
MSChart1.ColumnCount = 2
MSChart1.ChartData = Values
End Sub
--------------------------------------------------------------------------------
Thanks