Right Click Option Missing

  • Thread starter Thread starter MacGuy
  • Start date Start date
M

MacGuy

I have a template that users have the option to right click in any cell in
column A after row 1 and select a custom menu option. For most users there
is no problem.

For one particular user the custom option doesn't appear in the list - the
default options do. I've checked for errors and stepped through the code and
it does execute the .Caption and the .OnAction code but with no result (and
no error codes generated). The users are on xl 2002 and 2003. This issue is
on 2002.

This template has gone out to about a hundred users; this is the only user
having this problem. I'm using Worksheet_BeforeRightClick on the sheet-level
object.

Any ideas?
 
The user is on xl 2002. Here's the code:

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)

Dim mapGL As Object
For Each mapGL In Application.CommandBars("cell").Controls
If mapGL.Tag = "rpct" Then mapGL.Delete
Next mapGL
If Not Application.Intersect(Target, _
Range([a1].Offset(1, 0),
[a1].Offset(ActiveSheet.UsedRange.Rows.Count - 1, 0))) Is Nothing Then
With
Application.CommandBars("cell").Controls.Add(Type:=msoControlButton,
before:=5, temporary:=True)
.Caption = "REMOVE PAY CYCLE from TEMPLATE FEED"
.OnAction = "RemovePayCycle" 'runs this sub located in the
RemoveItem Module
.Tag = "rpct"
End With
End If

End Sub
 
Back
Top