View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
dgold82 dgold82 is offline
external usenet poster
 
Posts: 99
Default Help with Tooltip on clipart

Figuired it out using Jacob's method! Just tweaked the code a bit:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("nmToolTip")) Is Nothing Then
Application.Dialogs(xlDialogPrint).Show
Application.Goto Range("A1")
End If
End Sub

"dgold82" wrote:

Thanks Jacob, but I got a compile error...Any ideas?

"Jacob Skaria" wrote:

Try the below.

1. Select a cell in the same sheet which you are sure is not going to be
used..From menu InsertNameDefine. Assign a name say 'nmtooltip'

2. Right click on the imageHyperlink. Click Screen Tip button to add your
tip. Select the 'place in document' as the the defined name 'nmtooltip'

3. Right click the sheet tab. View code and paste the below code and save.
You dont need to assign macro to the picutre. Instead the PrintSheet will be
called from the selection change event.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("nmToolTip")) Is Nothing Then
Call PrintSheet
Application.Goto Range("A1")
End If
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"dgold82" wrote:

I have a picture of a printer on my worksheet that activates the following
macro. Can someone help me add code to make a tooltip that would display the
words "click to print" when a user hovers the mouse over the image:

Sub PrintSheet()
Application.Dialogs(xlDialogPrint).Show
' Range("AK6").Select
End Sub

Thanks.