Post your code. I don't see anything that jumps out. (It worked ok for me,
too.)
OK this is it:
At the time that I run this macro the cell cursor has a picture in it
at Range("D12")
Sub Macro4()
'
' Macro4 Macro
'
Dim myCell As Range
Dim myPict As Picture
Dim FoundIt As Boolean
With ActiveSheet
Set myCell = .Range("D12") 'or something
For Each myPict In .Pictures
If myPict.TopLeftCell.Address = myCell.Address Then
FoundIt = True
Exit For
End If
Next myPict
End With
If FoundIt = True Then
myPict.Select
Else
MsgBox "No pictures found!"
End If
End Sub
> Post your code. I don't see anything that jumps out. (It worked ok for me,
> too.)
[quoted text clipped - 48 lines]
> > >
> > > Dave Peterson
Dave Peterson - 04 Sep 2006 12:44 GMT
I still don't get a mismatch error when I try the code.
> OK this is it:
> At the time that I run this macro the cell cursor has a picture in it
[quoted text clipped - 81 lines]
> >
> > Dave Peterson

Signature
Dave Peterson
Dave Peterson - 04 Sep 2006 14:25 GMT
I don't have a guess why it's not working for you--do you have other shapes in
that activesheet that might confuse excel?
Maybe going through the shapes collection would work better:
Option Explicit
Sub Macro4()
'
' Macro4 Macro
'
Dim myCell As Range
Dim myShape As Shape
Dim FoundIt As Boolean
With ActiveSheet
Set myCell = .Range("D12") 'or something
For Each myShape In .Shapes
If myShape.TopLeftCell.Address = myCell.Address Then
FoundIt = True
Exit For
End If
Next myShape
End With
If FoundIt = True Then
myShape.Select
Else
MsgBox "No pictures found!"
End If
End Sub
> OK this is it:
> At the time that I run this macro the cell cursor has a picture in it
[quoted text clipped - 81 lines]
> >
> > Dave Peterson

Signature
Dave Peterson
Bobby - 04 Sep 2006 17:26 GMT
Could it be the Excel version that I use?(Excel 2003 (11.8012.6568)
SP2
-
> I don't have a guess why it's not working for you--do you have other shapes in
> that activesheet that might confuse excel?
[quoted text clipped - 114 lines]
> > >
> > > Dave Peterson
Dave Peterson - 04 Sep 2006 17:50 GMT
I wouldn't think so.
> Could it be the Excel version that I use?(Excel 2003 (11.8012.6568)
> SP2
[quoted text clipped - 121 lines]
> >
> > Dave Peterson

Signature
Dave Peterson
Bobby - 05 Sep 2006 01:24 GMT
Ok Dave thank's again for the trouble I will keep on trying!
Rgds.
-
> I wouldn't think so.
>
[quoted text clipped - 123 lines]
> > >
> > > Dave Peterson