
macro 1 to start if the user click on the mouse
Hi balluc,
You have DoubleClick and RightClick events. To see how these events
function: open your workbook, press Alt+F11, double click on ThisWorkbook
object and insert the code below:
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)
Cancel = True
MsgBox "You double-clicked. Cal your procedure (macro) here"
End Sub
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)
Cancel = True
MsgBox "You right-clicked. Cal your procedur(macro) here"
End Sub
HTH
Quote:
> Hi,
> I need your help again
> i would like to start a macro ( let's say macro 1) to start if the user
> click on the mouse.
> It must be wherever they are in the sheet.
> just a click and macro 1 starts.
> Can it be done ?
> And how to do it if I want a double click ?
> Thanks
> Luc