有点奇怪
同一个sub下的两个command,command1中已赋值的量,在command2中这些量得不到值,即显示空值,还需要什么命令?
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编辑过]