Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default OLEObjects clickable?

OLEObjects don't have a trappable right-click event. You may be able to use
the MouseDown event instead as it provides a Button parameter.

--

Vasant

"Erich Neuwirth" wrote in message
...
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



Reply
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
Clickable Cells JSnow Excel Discussion (Misc queries) 2 September 25th 08 04:50 PM
Glolbal Variables Reset when using OleObjects Rock Excel Programming 11 May 31st 04 03:00 AM
Assigning click event to OleObjects checkbox Jim McLeod Excel Programming 5 April 20th 04 07:02 PM
Referring to OLEObjects (combobox's on worksheet) Ian Chappel[_2_] Excel Programming 4 September 22nd 03 05:31 PM


All times are GMT +1. The time now is 08:15 PM.

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"