LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default right mouse click and IF...Then

I have the following:(A2:A10) is defined as MyRange

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

If Application.Intersect(Target, Range("MyRange")) Is Nothing Then
Exit Sub
CommandBars("InputNameB").ShowPopup

Cancel = True 'prevents normal Right-Click menu from appearing
End Sub

This works properly as is. I have two CommandBars; InputNameA & InputNameB.
I would like to show InputNameA when cell A1 is right-mouse clicked and
InputNameB when any other cell in "MyRange" is right-mouse clicked. I would
like to accomplish this without removing A1 from "MyRange". Suggestions?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Right Mouse Click StephenD Excel Discussion (Misc queries) 4 May 27th 09 04:24 PM
Each Click of the Mouse D.Parker Excel Discussion (Misc queries) 13 April 28th 05 11:24 PM
Mouse Over Graph, Capture Information on Click(Double Click) Dean Hinson[_3_] Excel Programming 1 December 6th 04 04:49 AM
Send mouse click? Johan Johansson Excel Programming 1 November 16th 04 10:28 PM
get value of a cell with a mouse click Ken Wright Excel Programming 0 July 22nd 03 07:15 PM


All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"