View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Erich Neuwirth Erich Neuwirth is offline
external usenet poster
 
Posts: 41
Default OLEObjects clickable?

I am working with an OLEObject on a worksheet.

Dim myGraphWrapper As OLEObject

an then later

Set myGraphWrapper = ActiveSheet.OLEObjects.Add(_
ClassType:="StatConnControls.GraphicsDevice", _
Link:=False, DisplayAsIcon:=False, _
Left:=181.5, Top:=65.25, _
Width:=256.5, Height:=204.75)


I would like to write a macro which should be run when the object is
richt-clicked.

I do not manage.

Dim WithEvents myGraphWrapper As OLEObject

makes the object unfunctional.
If I do not do that,

myGrapWrapper_GotFocus()

is not executed at all.

What is the idiom to achieve what I need,
an OLEObject reacting to mouse clicks.

Erich Neuwirth