nsalyani
05-26-2011, 08:38 AM
Hi,
I am trying to implement a left click of the mouse on my PowerPoint Slide using VBA.
I managed to get the Right Click command working with the code below:
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10
Public Sub RightDown()
mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
End Sub
Unfortunately I am nowhere close to implementing the Left Click. COULD SOMEONE HELP PLEASE.
Thanks
I am trying to implement a left click of the mouse on my PowerPoint Slide using VBA.
I managed to get the Right Click command working with the code below:
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10
Public Sub RightDown()
mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
End Sub
Unfortunately I am nowhere close to implementing the Left Click. COULD SOMEONE HELP PLEASE.
Thanks