- 帖子
- 712
- 主題
- 281
- 精華
- 0
- 積分
- 1019
- 點名
- 0
- 作業系統
- Windows 10
- 軟體版本
- Office 2019
- 閱讀權限
- 50
- 性別
- 男
- 註冊時間
- 2011-6-30
- 最後登錄
- 2025-5-22
|
[發問] 當滑鼠指到CommandButton變色~移開恢復原色~(已完成)
本帖最後由 av8d 於 2012-6-18 00:17 編輯
當滑鼠只到CommandButton變色
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton1.BackColor = &H80000018
End Sub
移開恢復原色請問是哪一個指令?謝謝
有MouseLeave嗎?
或是說當滑鼠移動到工作表上時作用~是否有這個指令?
-----------------------------------------------------------------------------------------------------------------------------------------------
找到解決方法了~(如下這是唯一暫時能用的方法)
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton1.BackColor = &H80000018
CommandButton2.BackColor = &HFFFFFF
CommandButton3.BackColor = &HFFFFFF
End Sub
Private Sub CommandButton2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton2.BackColor = &H80000018
CommandButton1.BackColor = &HFFFFFF
CommandButton3.BackColor = &HFFFFFF
End Sub
Private Sub CommandButton3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton3.BackColor = &H80000018
CommandButton1.BackColor = &HFFFFFF
CommandButton2.BackColor = &HFFFFFF
End Sub |
|