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_LEFTDOWN = &H2 Const MOUSEEVENTF_LEFTUP = &H4 Const MOUSEEVENTF_MIDDLEDOWN = &H20 Const MOUSEEVENTF_MIDDLEUP = &H40 Const MOUSEEVENTF_MOVE = &H1 Const MOUSEEVENTF_ABSOLUTE = &H8000 Const MOUSEEVENTF_RIGHTDOWN = &H8 Const MOUSEEVENTF_RIGHTUP = &H10 Sub AutomaticMouseClickLeft() ' Automatic Mouse Click Left Macro ' ' Developer: Winko Erades van den Berg ' E-mail : winko@winko-erades.nl ' Developed: 27-03-2012 ' Modified: 28-03-2012 ' Version: 1.0 ' ' Description: Automatic Mouse Click Left ' AantalKlikken = InputBox("Enter the number of Clicks to be executed :", "KlikkerDieKlikBox") 'Ask the number of Clicks to be executed Application.Wait (Now + Sheets("Sheet1").Cells(5, 2)) 'Get the delay from the sheet before starting to click - hh:mm:ss For Klik = 1 To AantalKlikken 'Start counting the Clicks 'Do mouse click on cursor position mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, cButt, dwEI DoEvents Application.Wait (Now + Sheets("Sheet1").Cells(5, 3)) 'Delay interval between Clicks - hh:mm:ss Next Klik 'Next Click 'End End Sub Sub AutomaticMouseMiddleClick() ' Automatic Mouse Middle Click Macro ' ' Developer: Winko Erades van den Berg ' E-mail : winko@winko-erades.nl ' Developed: 27-03-2012 ' Modified: 28-03-2012 ' Version: 1.0 ' ' Description: Automatic Mouse Click Middle ' AantalKlikken = InputBox("Enter the number of Clicks to be executed :", "KlikkerDieKlikBox") 'Ask the number of Clicks to be executed Application.Wait (Now + Sheets("Sheet1").Cells(5, 2)) 'Get the delay from the sheet before starting to click - hh:mm:ss For Klik = 1 To AantalKlikken 'Start counting the Clicks 'Do mouse click on cursor position mouse_event MOUSEEVENTF_MIDDLEDOWN Or MOUSEEVENTF_MIDDLEUP, 0&, 0&, cButt, dwEI DoEvents Application.Wait (Now + Sheets("Sheet1").Cells(5, 3)) 'Delay interval between Clicks - hh:mm:ss Next Klik 'Next Click 'End End Sub Sub AutomaticMouseClickRight() ' Automatic Mouse Click Right Macro ' ' Developer: Winko Erades van den Berg ' E-mail : winko@winko-erades.nl ' Developed: 27-03-2012 ' Modified: 28-03-2012 ' Version: 1.0 ' ' Description: Automatic Mouse Click Right ' AantalKlikken = InputBox("Enter the number of Clicks to be executed :", "KlikkerDieKlikBox") 'Ask the number of Clicks to be executed Application.Wait (Now + Sheets("Sheet1").Cells(5, 2)) 'Get the delay from the sheet before starting to click - hh:mm:ss For Klik = 1 To AantalKlikken 'Start counting the Clicks 'Do mouse click on cursor position mouse_event MOUSEEVENTF_RIGHTDOWN Or MOUSEEVENTF_RIGHTUP, 0&, 0&, cButt, dwEI DoEvents Application.Wait (Now + Sheets("Sheet1").Cells(5, 3)) 'Delay interval between Clicks - hh:mm:ss Next Klik 'Next Click 'End End Sub