VB 存数据问题
请各位大大帮帮忙
我现在编个测试系统。现在需要把测试所得的数据,还有自己手打的产品规格,公司名称等信息一同保存下来到txt,我数据表格用的FlexGrid
请问怎么将Lable里的信息和FlexGrid的数据一起保存和读取啊。谢谢各位了
单单FlexGrid的数据保存以下代码,但怎样将LABLE里的文字信息一起保存那?
Private Sub SaveTxt_Click()
With dlgDlg
.DialogTitle = "Save as Text"
.FileName = ""
.CancelError = False
.Filter = "Text Files (*.dat)|*.dat"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sfile = .FileName
End With
SaveText sfile
GrdSheet.row = 1: GrdSheet.col = 1
End Sub
Sub SaveText(f)
Close
n = FreeFile
Open f For Output As #n
Print #n, GrdSheet.Rows, GrdSheet.Cols
For i = 1 To GrdSheet.Rows - 1
For j = 1 To GrdSheet.Cols - 1
Print #n, GridArray(i, j)
Next
Next
Close n
End Sub