代码如下Private Sub Command1_Click()
Dim a As Single, b As Single, c As Single, d As Single
a = Val(Text1.Text)
b = Val(Text2.Text)
c = a + b
d = 2 * c
Label1.Caption = Str(d)
End Sub
Private Sub Command2_Click()
Open App.Path & "\abc.txt" For Output As #1
Print #1, a, b, c, d
Close #1
End Sub
点击Command2,abc.txt无打印结果。
[此贴子已经被作者于2007-8-30 11:27:39编辑过]