Here is the situation. I am creating a report function in MS Excel. I am writing text and into a MS Excel sheet and I paste graphs into the sheet as well. This works all fine when using it once.
Next time I run the routine I want to delete the previous report. It is easy to delete all text by using
Sheets("detailed results").Select
Sheets("detailed results").Cells(5, 2).Resize(15000, 9).Select
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Bold = False
Selection.ClearContents
However picture that I previously pasted into the report are still there. How can I detect and then delete pictures?
Any ideas welcome.
Thanks for your help in advance.
Next time I run the routine I want to delete the previous report. It is easy to delete all text by using
Sheets("detailed results").Select
Sheets("detailed results").Cells(5, 2).Resize(15000, 9).Select
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Bold = False
Selection.ClearContents
However picture that I previously pasted into the report are still there. How can I detect and then delete pictures?
Any ideas welcome.
Thanks for your help in advance.