vb的一道程序题

来源:百度知道 编辑:UC知道 时间:2024/07/03 02:51:28
Option Explicit

Enum Week
a = 1
b = 2
c = 3
d = 4
e = 5
f = 6
g = 7
End Enum

Private Sub Command1_Click()
Debug.Print Week.a
End Sub
Private Sub Command2_Click()
Debug.Print Week.b
End Sub
Private Sub Command3_Click()
Debug.Print Week.c
End Sub
Private Sub Command4_Click()
Debug.Print Week.d
End Sub
Private Sub Command5_Click()
Debug.Print Week.e
End Sub
Private Sub Command6_Click()
Debug.Print Week.f
End Sub
Private Sub Command7_Click()
Debug.Print Week.g
End Sub
请问为什么输出什么都没有Debug.Print 是什么意思,输出在哪里可以看到

Debug.Print 是输出在“立即窗口”中。

所有debug.print仅在VBIDE模式中“运行”有效;编译成EXE以后就无效了。

这个是调试用的。

Debug.Print 输出到临时窗口.也就是说的调试窗口

你去掉debug,就输出到窗体上了.