Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Help with Tooltip on clipart

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Help with Tooltip on clipart

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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Help with Tooltip on clipart

Sub test()
Dim s As Shape

Set s = ActiveSheet.Shapes("Picture 1")
ActiveSheet.Hyperlinks.Add Anchor:=s, Address:= _
"", SubAddress:="AK6", ScreenTip:="click to print"
s.OnAction = "PrintSheet"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Help with Tooltip on clipart

maybe replace
SubAddress:="AK6",
with
SubAddress:=s.TopLeftCell.Address

Regards,
Peter T

"r" wrote in message
...
Sub test()
Dim s As Shape

Set s = ActiveSheet.Shapes("Picture 1")
ActiveSheet.Hyperlinks.Add Anchor:=s, Address:= _
"", SubAddress:="AK6", ScreenTip:="click to print"
s.OnAction = "PrintSheet"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Help with Tooltip on clipart

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.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Help with Tooltip on clipart

Hi Peter,
A sub-address is not really required as "" will work.
However, the problem I've never been able to solve is that the assigned
macro is ignored when a hyperlink/screen tip is attached to the shape.
--
Jim Cone
Portland, Oregon USA


"Peter T" <peter_t@discussions
wrote in message
maybe replace
SubAddress:="AK6",
with
SubAddress:=s.TopLeftCell.Address
Regards,
Peter T

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Help with Tooltip on clipart

Hi Jim,

I really thought I had tested before posting but you are right!

Jocob's Application.Goto Range("A1") could be to a cell under the shape.

Regards,
Peter T

"Jim Cone" wrote in message
...
Hi Peter,
A sub-address is not really required as "" will work.
However, the problem I've never been able to solve is that the assigned
macro is ignored when a hyperlink/screen tip is attached to the shape.
--
Jim Cone
Portland, Oregon USA


"Peter T" <peter_t@discussions
wrote in message
maybe replace
SubAddress:="AK6",
with
SubAddress:=s.TopLeftCell.Address
Regards,
Peter T



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Help with Tooltip on clipart

This might be a stupid question, but how do I find my clipart/picture name.
You have "Picture 1" below--not sure what to put for my code. Thanks.

"r" wrote:

Sub test()
Dim s As Shape

Set s = ActiveSheet.Shapes("Picture 1")
ActiveSheet.Hyperlinks.Add Anchor:=s, Address:= _
"", SubAddress:="AK6", ScreenTip:="click to print"
s.OnAction = "PrintSheet"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


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


  #9   Report Post  
Posted to microsoft.public.excel.programming
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.


  #10   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Help with Tooltip on clipart

Sub Picture_Name()
Dim v

For Each v In ActiveSheet.Shapes
Debug.Print v.Name
Next

End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"dgold82" wrote:

This might be a stupid question, but how do I find my clipart/picture name.
You have "Picture 1" below--not sure what to put for my code. Thanks.

"r" wrote:

Sub test()
Dim s As Shape

Set s = ActiveSheet.Shapes("Picture 1")
ActiveSheet.Hyperlinks.Add Anchor:=s, Address:= _
"", SubAddress:="AK6", ScreenTip:="click to print"
s.OnAction = "PrintSheet"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


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




  #11   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Help with Tooltip on clipart

well! I learned something :-)
regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"Jim Cone" wrote:

Hi Peter,
A sub-address is not really required as "" will work.
However, the problem I've never been able to solve is that the assigned
macro is ignored when a hyperlink/screen tip is attached to the shape.
--
Jim Cone
Portland, Oregon USA


"Peter T" <peter_t@discussions
wrote in message
maybe replace
SubAddress:="AK6",
with
SubAddress:=s.TopLeftCell.Address
Regards,
Peter T


  #12   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Help with Tooltip on clipart

however, my solution does not work
Watch the intervention of Jim Cone
regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"r" wrote:

Sub Picture_Name()
Dim v

For Each v In ActiveSheet.Shapes
Debug.Print v.Name
Next

End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"dgold82" wrote:

This might be a stupid question, but how do I find my clipart/picture name.
You have "Picture 1" below--not sure what to put for my code. Thanks.

"r" wrote:

Sub test()
Dim s As Shape

Set s = ActiveSheet.Shapes("Picture 1")
ActiveSheet.Hyperlinks.Add Anchor:=s, Address:= _
"", SubAddress:="AK6", ScreenTip:="click to print"
s.OnAction = "PrintSheet"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


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


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Help with Tooltip on clipart


Sub Macro()
Dim obj As Object
For Each obj In ActiveSheet.DrawingObjects
Debug.Print obj.Name
Next
End Sub


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


"dgold82" wrote:

This might be a stupid question, but how do I find my clipart/picture name.
You have "Picture 1" below--not sure what to put for my code. Thanks.

"r" wrote:

Sub test()
Dim s As Shape

Set s = ActiveSheet.Shapes("Picture 1")
ActiveSheet.Hyperlinks.Add Anchor:=s, Address:= _
"", SubAddress:="AK6", ScreenTip:="click to print"
s.OnAction = "PrintSheet"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


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


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
washout of clipart in Excel 2007 / send back clipart behind text stewartnmij Excel Discussion (Misc queries) 1 February 25th 10 01:09 AM
Clipart in Marco Glenn Excel Programming 1 April 22nd 05 11:43 PM
ClipArt to macro Glenn Excel Programming 1 April 22nd 05 08:02 PM
adding clipart Angelfree Excel Discussion (Misc queries) 1 January 19th 05 08:31 PM
HOW TO INSERT CLIPART IN A HEADER paul ainscough Excel Discussion (Misc queries) 1 January 15th 05 11:28 PM


All times are GMT +1. The time now is 11:22 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"