right-click cell menu only for specific range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to get a personalised right-click menu for a named range and
the standard menu for anywhere else ?
I'm changing the cell menu through Workbook_Activate and I guess an "If"
regarding the ActiveCell could do it. What's the best way to say "if the
active cell is inside this range, do A. Otherwise do B (or do nothing)"
 
Use the worksheet level beforerightclick event to do it. It has an
argument "Target" which passes in which cell(s) triggered the event. You
can use this to rebuild the CELL menu.
 
Thanks Tom,
I just found that myself and am using it in conjuction with this:
If Not Intersect(ActiveCell, Range("CLI")) Is Nothing Then
 
Another question arises from what I'm doing: how can I completely clear the
CELL menu before adding my items ?
I'll use the reset command later on.

Do I have to empty the standard menu by calling up the controls one by one
(based on their captions ?) and deleting them or is there a single
all-powerful command ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top