Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Finding name of shape that was last clicked - Application.Caller

Hey,

I have some shapes on a worksheet. Each shape contains a hyperlink,
however in addition to the hyperlink being clicked, for certain shapes
I need a userform to also appear when the shape is clicked. I tried
to assign a macro which DOES not work if the hyperlink is still
assinged. However if I delete the hyperlink then the macro will
work. Then I am able to use Application.Caller and figure out the
name of the shape that called the macro. Well this will not work
because I need the hyperlink to still work.

because of this, I tried to set the hyperlink to a cell address on the
worksheet and then use the Worksheet_SelectionChange event to run the
Application. Caller macro when that cell is selected, however then I
get error 2023.

How can I accomplish what I need?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Finding name of shape that was last clicked - Application.Caller


Assign code to the Shape that does both: goes somewhere and displays the Userform.
'---
Sub DoItForMe()
With ThisWorkbook.Worksheets("Sheet2")
.Select
.Range("C20").Select
End With
UserForm1.Show
End Sub
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(Extras for Excel add-in: convenience built-in)





"hutteto"
wrote in message
...
Hey,

I have some shapes on a worksheet. Each shape contains a hyperlink,
however in addition to the hyperlink being clicked, for certain shapes
I need a userform to also appear when the shape is clicked. I tried
to assign a macro which DOES not work if the hyperlink is still
assinged. However if I delete the hyperlink then the macro will
work. Then I am able to use Application.Caller and figure out the
name of the shape that called the macro. Well this will not work
because I need the hyperlink to still work.

because of this, I tried to set the hyperlink to a cell address on the
worksheet and then use the Worksheet_SelectionChange event to run the
Application. Caller macro when that cell is selected, however then I
get error 2023.

How can I accomplish what I need?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Finding name of shape that was last clicked - Application.Caller

How do I assign code to it? I tried assigning a macro but if you have
a hyperlink, the hyperlink will override the assigned macro and the
assigned macro will never run when you click the shape. The only
thing that runs is the hyperlink, not the assigned macro.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Finding name of shape that was last clicked - Application.Caller

Remove the hyperlink.
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(List Files add-in: lists specific files/folders with hyperlinks)



"hutteto"
wrote in message
...
How do I assign code to it? I tried assigning a macro but if you have
a hyperlink, the hyperlink will override the assigned macro and the
assigned macro will never run when you click the shape. The only
thing that runs is the hyperlink, not the assigned macro.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Finding name of shape that was last clicked - Application.Caller

I need the hyperlink. Is there a way around this?


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Finding name of shape that was last clicked - Application.Caller

On Mar 25, 3:38*pm, hutteto wrote:
I need the hyperlink. Is there a way around this?


Do the hyperlinking within the assigned macro.
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
application.caller Alexander Excel Programming 3 December 8th 06 11:18 PM
Row = Application.Caller.Row Charles Woll Excel Worksheet Functions 8 February 28th 05 02:04 PM
Application.Caller Mark Worthington Excel Programming 9 February 12th 04 07:32 PM
application.caller Jase Excel Programming 0 January 6th 04 03:51 AM
Application.caller Clark B Excel Programming 2 July 29th 03 11:17 PM


All times are GMT +1. The time now is 12:17 AM.

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"