當(dāng)用戶在“窗體”視圖、“數(shù)據(jù)表視圖”、“數(shù)據(jù)透視表視圖”或“數(shù)據(jù)透視圖視圖”中滾動(dòng)鼠標(biāo)輪時(shí),該事件發(fā)生。
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
Page 如果頁(yè)已更改,則為 True。
Count 用鼠標(biāo)輪滾動(dòng)視圖的行數(shù)。
下面的示例說明了捕獲 MouseWheel 事件的子程序的語(yǔ)法。
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