right click menu

K

kurt

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
 
C

Chip Pearson

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)
 

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

Top