Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default detecting shape clicked on

Is there a way for me to tell which shape is clicked on within an
image mapped in html and pasted into a worksheet? I want to use the
AlternativeText for the ShapeRange as a variable string to run a query
and pull data.

I posted this elsewhere but haven't seen any responses yet.
Thank You,

Scott
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default detecting shape clicked on


A mapped image is pasted into excel as a grouped shape
each mapped area becomes a groupitem of that group.
some items have there own hyperlink

You could delete the hyperlinks and replace them
with a call to a macro...


I copied the first (mapped) image from http://www.ihip.com/
start with the word convert select to begin.
Pastespecial into excel...

I had to kill the hyperlink as these take precendence
over the onaction...

you could embelish by storing the deleted hyperlink into an array
or collection which is then used by macro1...


and made this procedure to tell which is which

Sub ConvertMapHLtoMacro()
Dim grpSh As GroupShapes
Dim itmSh As Shape
Dim hl As Hyperlink

On Error Resume Next
Set grpSh = ActiveSheet.Shapes("Group 1").GroupItems
If Not grpSh Is Nothing Then
For Each itmSh In grpSh
Set hl = itmSh.Hyperlink
If Not hl Is Nothing Then
itmSh.OnAction = "macro1"
hl.Delete
End If
Next
End If
End Sub

Sub macro1()
Dim c
c = Application.Caller
MsgBox "you clicked on: " & c
End Sub




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


(notsureofthatinfo) wrote:

Is there a way for me to tell which shape is clicked on within an
image mapped in html and pasted into a worksheet? I want to use the
AlternativeText for the ShapeRange as a variable string to run a query
and pull data.

I posted this elsewhere but haven't seen any responses yet.
Thank You,

Scott


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
Function Arguments dialog vanishes when clicked an inserted shape RK Excel Worksheet Functions 2 February 2nd 09 07:58 AM
enter time when shape is clicked Dgwood90 Excel Discussion (Misc queries) 1 October 15th 08 10:31 AM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Deleting a shape and the cell contents the shape is in. Dave Peterson[_3_] Excel Programming 1 October 9th 03 03:36 PM
Deleting a shape and the cell contents the shape is in. Tom Ogilvy Excel Programming 0 October 9th 03 03:43 AM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"