View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default right click menu

In the event procedure, set the value of the Cancel parameter to True.

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, Cancel As Boolean)
'''''''''''''''''''''''''''
' your code here
''''''''''''''''''''''''''
Cancel = True
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"kurt" wrote in message
...
Hi

After I have used this macro
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)

I put data in the activecell with help of a listbox and it worksvery
fine

After returning to the sheet I have the "right click menu" on the
screen, to get rid of this I have to select a cell manually, it do not
works by putting the VBA cose Range("A1").select in the end of the
macro

Is it posible to not have this "right click menu" after finnished the
"Workbook_SheetBeforeRightClick" macro???

Thanks in advance


Kurt