Picture on Worksheet Cell

K

kirkm

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
 
G

Gary''s Student

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.
 
K

kirkm

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
 
G

Gary''s Student

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!
 
K

kirkm

On Fri, 29 May 2009 07:11:01 -0700, Gary''s Student

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
 
K

kirkm

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
 

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