VBA worksheet array Clear graphs

N

NPell

What im trying to do is to clear all the Graphs / Shapes on a few
sheets.

Ive got..

Sub()
Dim Sh As Worksheet

For Each Sh In Array("Sheet 1", "Sheet 2", "Sheet 3")
Sh.Unprotect
Sh.Shapes(Sh.Shapes.Count).Delete
Range("A1").Select
Next Sh

End Sub

It doesnt work though?
Never was good with arrays.
Can anybody help? Or suggest something?
 
D

Don Guillett

try this

For Each Sh In Array("Sheet 1", "Sheet 2", "Sheet 3")
Sh.Unprotect
For Each s In sh.Shapes
s.Cut
Next
Next Sh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top