ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Picture on Worksheet Cell (https://www.excelbanter.com/excel-programming/429122-picture-worksheet-cell.html)

kirkm[_8_]

Picture on Worksheet Cell
 

Is it possible for the picture to have a Control Tip text ?

Also, can the X-Y mouse coordinates be read programmicably? I'd like
to have 2 events depending on what part is clicked... but could use 2
pictures if that's the only way.

Thanks - Kirk

Gary''s Student

Picture on Worksheet Cell
 
You can create a popup message on mouse-over by assigning a hyperlink to the
picture.

It does not matter where the hyperlink links to, you intercept the hyperlink
event and run your macro from the event code.

Basically you use an indirect approach; your macro is not assinged to the
picture, it is called by the hyperlink event macro.
--
Gary''s Student - gsnu200855


"kirkm" wrote:


Is it possible for the picture to have a Control Tip text ?

Also, can the X-Y mouse coordinates be read programmicably? I'd like
to have 2 events depending on what part is clicked... but could use 2
pictures if that's the only way.

Thanks - Kirk


kirkm[_8_]

Picture on Worksheet Cell
 
On Fri, 29 May 2009 03:12:01 -0700, Gary''s Student
wrote:

You can create a popup message on mouse-over by assigning a hyperlink to the
picture.

It does not matter where the hyperlink links to, you intercept the hyperlink
event and run your macro from the event code.

Basically you use an indirect approach; your macro is not assinged to the
picture, it is called by the hyperlink event macro.


Thanks Gary... but could you give more details plse? I couldn't get
my assigned macro to start via a Hyperlink, and also the Tip was
positioned on column1, nowhere near the picture. Couldn't see where
you change that.

Cheers - Kirk


Gary''s Student

Picture on Worksheet Cell
 
Say we start with MyMacro in a standard module and some picture on the
worksheet.

1. right-click the picture and assign a hyperlink to a place in this document
2. make the place IV65536
3. settup your tooltip

So now if you mouse-over the picture you should see the tooltip; if you
click the picture you should go to IV65536

4. next right-click the tabname and pick View code; gets you to the
worksheet code area.
5. install the following event macro:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("IV65536")) Is Nothing Then
Else
Call MyMacro
Application.Goto
End If
End Sub


MyMacro will run and the Goto gets you back from IV65536.

Have Fun!
--
Gary''s Student - gsnu200855


"kirkm" wrote:

On Fri, 29 May 2009 03:12:01 -0700, Gary''s Student
wrote:

You can create a popup message on mouse-over by assigning a hyperlink to the
picture.

It does not matter where the hyperlink links to, you intercept the hyperlink
event and run your macro from the event code.

Basically you use an indirect approach; your macro is not assinged to the
picture, it is called by the hyperlink event macro.


Thanks Gary... but could you give more details plse? I couldn't get
my assigned macro to start via a Hyperlink, and also the Tip was
positioned on column1, nowhere near the picture. Couldn't see where
you change that.

Cheers - Kirk



kirkm[_8_]

Picture on Worksheet Cell
 
On Fri, 29 May 2009 07:11:01 -0700, Gary''s Student
wrote:

Thanks for those instructions... all working just fine except
for one thing... the picture is in the middle of the screen
but the Tip shows on the extreme LH side. You kinda don't
see it there.... can it be repositioned?

Thanks - Kirk

kirkm[_8_]

Picture on Worksheet Cell
 


Oops... cancel my last Gary! Struck a snag...

The macro it calls uses the ActiveCell.row... which of course has
changed to the Hyperlink address. I don't think it's worth the hassle
of a workaround... just the have a control tip.

Thanks anyway - Kirk



All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com