cgutierrez
New Member
- Joined
- Sep 11, 2013
- Messages
- 2
I am developing an excel vba application that uses the Worksheet_BeforeRightClick event to pop-up a dialog with a listbox in which the user can select from a list of products.
My event handler works perfectly in Excel for Microsoft Office 2013 and 2010... in Windows 8 and Windows 7 desktops...
However, it is not being called from a Windows 8 Tablet. If I use the mouse or trackpad to right-click on the sensitive cell, it works, but if I press my finger against the cell on the screen for several seconds, the context-sensitive menu comes up without my event-handler being called.
(Pressing the finger against the screen for a second or more is the tablet-way to simulate a right-click.)
Excel is recognizing the event because the context-sensitive menu for the cell comes up... the problem is my event-handler is not getting called.
Is this a bug in Excel/2013/Windows 8? Is there a separate vba event for touch gestures? Am I missing something?
I include the code for my event handler for completeness but the event is simply not getting dispatched:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim rngSku, rngCust As Range
If kiHeaderRow0 = 0 Then ' Should never be zero...
Worksheet_Activate
End If
Set rngCust = Sheets("Orden").Range("B" + Format(kiHeaderRow0))
Set rngSku = Sheets("Orden").Range("C" + Format(kiDetailRow0) + ":C" + Format(kiDetailRow1))
Cancel = False
If Not Intersect(Target, rngSku) Is Nothing Then
DoSelSKU
Cancel = True
End If
If Not Intersect(Target, rngCust) Is Nothing Then
DoSelCust
Cancel = True
End If
End Sub
My event handler works perfectly in Excel for Microsoft Office 2013 and 2010... in Windows 8 and Windows 7 desktops...
However, it is not being called from a Windows 8 Tablet. If I use the mouse or trackpad to right-click on the sensitive cell, it works, but if I press my finger against the cell on the screen for several seconds, the context-sensitive menu comes up without my event-handler being called.
(Pressing the finger against the screen for a second or more is the tablet-way to simulate a right-click.)
Excel is recognizing the event because the context-sensitive menu for the cell comes up... the problem is my event-handler is not getting called.
Is this a bug in Excel/2013/Windows 8? Is there a separate vba event for touch gestures? Am I missing something?
I include the code for my event handler for completeness but the event is simply not getting dispatched:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim rngSku, rngCust As Range
If kiHeaderRow0 = 0 Then ' Should never be zero...
Worksheet_Activate
End If
Set rngCust = Sheets("Orden").Range("B" + Format(kiHeaderRow0))
Set rngSku = Sheets("Orden").Range("C" + Format(kiDetailRow0) + ":C" + Format(kiDetailRow1))
Cancel = False
If Not Intersect(Target, rngSku) Is Nothing Then
DoSelSKU
Cancel = True
End If
If Not Intersect(Target, rngCust) Is Nothing Then
DoSelCust
Cancel = True
End If
End Sub