Private Sub Button2_MouseClicked (EventData As MouseEvent)
' Select Directory
Dim DC As DirectoryChooser
DC.Initialize
DC.InitialDirectory = "C:"
Dim Folder As String = DC.Show(frmMain)
Dim FileName As String = "NewData.csv"
' Get Time and Day
DateTime.TimeFormat="HH:mm"
Dim TimeMin As String = DateTime.Time(DateTime.Now)
DateTime.DateFormat = "dd MMM yyyy"
Dim TimeDay As String = DateTime.Date(DateTime.now)
' Add data row by row
Dim su As StringUtils
Dim List1 As List
List1.Initialize
Dim Headers(6) As String = Array As String ("Date", "Time", "Name", "CC", "Max Power", "Max Torque") ' Row header for all data ?
List1.Add(Headers)
For i = 1 To 20
List1.add(Array As String(TimeDay, TimeMin, "Honda #" & i, 100 * i, 2000 +(20 *i), 3000+i))
Next
su.SaveCSV(Folder, FileName, ",",List1)
End Sub