Ok I have the following code
As you can see that separates the data into a Month and a Sales figure.Code:Private Sub mnuGraphText_Click() Dim Inputdata As String Dim sMonth As String Dim sSales As String Dim pos1 As Integer Dim pos2 As Integer Open App.Path & "\sales.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Inputdata pos1 = InStr(Inputdata, ",") sMonth = Mid$(Inputdata, 1, pos1 - 1) pos2 = InStr((pos1 + 1), Inputdata, ",") sSales = Mid$(Inputdata, (pos1 + 1), (pos1 + 1)) ' Debug.Print sMonth; sSales Loop Close #1 End Sub
No I need to plot that on an MSchart.
I know I need to make some kind of array but I'm a bit stuck. I also have 12 text boxes on the form for another feature, could I put the data into them then onto the chart or does that just not seem sensible...




Reply With Quote