VB编程有关上一点,下一点的程序
Dim j As IntegerDim AX(100) As Double
Dim GCH(100) As Double
下一点的代码:
AX(j) = Val(Text7.Text)
GCH(j) = Val(Text6.Text)
If Text6.Text = "" Or Text7.Text = "" Then
MsgBox "请输入正确的数据"
Else
Open App.Path & "\jilu.txt" For Append As #1
Print #1, AX(j), GCH(j)
Close #1
Text6.Text = ""
Text7.Text = ""
j = j + 1
lblDXCS.Caption = "第" & Form2.Text1.Text & "断面第" & j & "个地形点参数:"
上一点的代码:
j = j - 1
Text6.Text = GCH(j)
Text7.Text = AX(j)
lblDXCS.Caption = "第" & Form2.Text1.Text + 1 & "断面第" & j & "个地形点参数:"
我点了上一点后,可以看到以前输入的数据,点下一点就是空的,我应该怎么改改能看到下一点的数据,而且保存在文件中的数据也是对的没有重复