try:
Code:
Sub Check()
'Determine which Cover Picture was selected and Move it to the Back so the underlying Picture is showing.
Set shCoverPicture = ActiveSheet.Shapes(Application.Caller)
shCoverPicture.ZOrder msoSendToBack
'Get the Name of the first Cover Picture selected.
MsgBox ("shCoverPicture.Name = " & shCoverPicture.Name)
'Get the address of the selected Cell
strTheCellSelected = shCoverPicture.TopLeftCell.Address
MsgBox ("strTheCellSelected = " & strTheCellSelected)
'***** Stuck Here *****
'Get the .Name of the Picture/Shape that is undernearth the shCoverPicture that has been selected by the User.
zpos = -1 'impossible z position
For Each shp In ActiveSheet.Shapes
If shp.TopLeftCell.Address = strTheCellSelected Then
If shp.ZOrderPosition >= zpos Then
Set TopMostShp = shp
zpos = shp.ZOrderPosition
End If
End If
Next shp
MsgBox "Top shape name is " & TopMostShp.Name
End Sub
Bookmarks