先给代码打断点,然后在VB6IDE的【视图】点击【本地窗口】就行,来段代码测试。
新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Sub Command1_Click()
Dim strA As String
strA = "Hello "
Debug.Print Time & strA
End Sub
Private Sub Command2_Click()
Dim strB As String
strB = "I am man. "
Debug.Print Time & strB
End Sub
断点打在Command1的End Sub,运行后只看到Me和strA,直接显示strA的值。