js insertafter:关于ByVal

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 02:09:14
Private Sub ctListBar1_ItemClick(ByVal nList As Integer, ByVal nItem As Integer)
MsgBox "你点击的项目名称是:"hello"
End Sub

如果把ByVal nList As Integer, ByVal nItem As Integer去掉的话,就会显示"过程声明与同名事件或过程的描述不匹配"
这是为什么呢```
msgbox里面没有调用任何值,去掉应该无妨才对啊

在VB中,声明是自动生成的,如果你用的是commnand按钮,就不会有这种情况出现。