新旧gre对比:请教:我想知道这道题为什么是这样

来源:百度文库 编辑:神马品牌网 时间:2024/05/02 22:29:08
Private Sub Commend1_Click()
Dim A As Integer, B As Integer
Text1.SelStart = 2
Text1.SelLength = 2
A = Val(Text1.SelText)
B = Len(Text1.Text)
Print A * B
End Sub
我运行了没有结果

Private Sub Commend1_Click()
Dim A As Integer, B As Integer
Text1.SelStart = 2
Text1.SelLength = 2
text1.setfocus '加一个这个语句,把焦点移到TEXTBOX中
A = Val(Text1.SelText)
B = Len(Text1.Text)
Print A * B
End Sub

错误