Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) MsgBox "Double click" Cancel = True End Sub Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) MsgBox "Right click" Cancel = True End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If KeyPressed(vbKeyRButton) = True Then Exit Sub MsgBox "Left click" Cancel = True End Sub Public Function KeyPressed(ByVal Key As Long) As Boolean 'The function returns true if a key is pressed,false if not KeyPressed = CBool((GetAsyncKeyState(Key) And &H8000) = &H8000) End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.