I am doing a little Excel + vba application and I have got stuck. I know that using
Application.CommandBars("Cell").Controls.*
I can change right click menu to only show specific options for specific cell (of course with additional code).
But is there a way to change the menu when I click right mouse button above autoshape?
I have been using something like
(...)
'checking autoshape position
sh_le = sh.Left
sh_to = sh.Top
sh_ri = sh.Left + sh.Width
sh_do = sh.Top + sh.Height
'checking clicked cell position
cc_le = cel.Left
cc_to = cel.Top
cc_ri = cel.Left + cel.Width
cc_do = cel.Top + cel.Height
If (sh_le <= cc_le) And (sh_to <= cc_to) And (sh_ri >= cc_ri) And (sh_do >= cc_do) Then
'build custom menu
end if
It looks good (at least I think so :) - but when I am clicking above shape, the Worksheet_BeforeRightClick
is not starting. Is there any other way to do so? I would be grateful for any information.