macro 1 to start if the user click on the mouse 
Author Message
 macro 1 to start if the user click on the mouse

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



Thu, 08 Jul 2004 09:30:15 GMT  
 macro 1 to start if the user click on the mouse
Balluc,

There's a "Before Right Click" and a "Before Double Click" on the sheet
events.
Don't know if that'll help.
For a single click, John Walkenback shows a way to do that on his web
site.

John

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



Thu, 08 Jul 2004 10:35:49 GMT  
 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



Thu, 08 Jul 2004 22:24:21 GMT  
 macro 1 to start if the user click on the mouse



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



Fri, 09 Jul 2004 04:08:11 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. CTRL + Right mouse click or Double Right Mouse click or similar

2. Run macro as a mouse right-click option

3. Activate left mouse click through VBA/Macro

4. Mouse Click Macro - Is It Possible ?

5. Assign macro to right mouse click

6. Add macro/procedure to righ mouse click menu

7. Macro That Moves You to the Next Worksheet With A Mouse Click

8. eliminating confirmation mouse clicks with a macro??

9. Mouse click to bypass OnExit Macro

10. mouse click freeze and radio mouse


 
Powered by phpBB® Forum Software © phpBB Group