当用户在“窗体”视图、“数据表视图”、“数据透视表视图”或“数据透视图视图”中滚动鼠标轮时,该事件发生。
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
Page 如果页已更改,则为 True。
Count 用鼠标轮滚动视图的行数。
下面的示例说明了捕获 MouseWheel 事件的子程序的语法。
Private Sub Form_MouseWheel( _
ByVal Page As Boolean, ByVal Count As Long)
If Page = True Then
MsgBox "You've moved to another page."
End If
End Sub