That was a good suggestion. I was running the macro against a large sheet
that had been cut and pasted from a web site. I started over with a New
workbook, pasted a smaller number of rows and it ran fine.
I'm running Excel 2000. I'm guessing that there was some kind of memory
overlap problem with the extra large number of row. Very strange behavior.
The first sheet I was using had 528 rows, the 2nd time I ran the sheet had
about 324. That seems very odd.
Both data sets are from the same web site, just a smaller number of rows,
same headers and footers.
"Dave Peterson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If you create a test workbook and add some shapes, does your code work ok?
>
> I'd guess that your workbook is corrupted some way.
>
> Maybe you activate a different sheet in your real workbook and test it
> there.
> Maybe it's just that single sheet that's a problem.
>
> George wrote:
>>
>> This is what my entire Sub looks like, its failing on line 2 as described
>> before
>>
>> Sub DelShapesOnSht()
>> Dim shp As Shape
>> Debug.Print ActiveWorkbook.Name
>> Debug.Print ActiveWorkbook.ActiveSheet.Name
>>
>> Debug.Print ActiveWorkbook.ActiveSheet.Shapes.Count
>> If ActiveWorkbook.ActiveSheet.Shapes.Count > 0 Then
>> For Each shp In ActiveWorkbook.ActiveSheet.Shapes
>> shp.Delete 'Delete the shape
>> Next shp
>> End If
>> End Sub
>>
>> "Gary''s Student" <(E-Mail Removed)> wrote in
>> message
>> news:88C953B8-18D9-4779-963D-(E-Mail Removed)...
>> > Hi George:
>> >
>> > Put your lines of code in a sub in a standard module and try them there
>> > --
>> > Gary''s Student - gsnu200812
>> >
>> >
>> > "George" wrote:
>> >
>> >> I get the same message on the line of code you suggested which is what
>> >> I
>> >> already had previously
>> >>
>> >>
>> >> "Gary''s Student" <(E-Mail Removed)> wrote in
>> >> message
>> >> news
ED59EB2-EBE2-434A-8033-(E-Mail Removed)...
>> >> > Debug.Print ActiveWorkbook.ActiveSheet.Name
>> >> > --
>> >> > Gary''s Student - gsnu200812
>> >>
>> >>
>> >>
>
> --
>
> Dave Peterson