macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
 
This should be close...

sub RemoveShapes
dim wks as worksheet
dim shp as shape

for each wks in worksheets
for each shp in wks.shapes
shp.Delete
next shp
next wks
end sub
 
Jim

Thank you for answering so quickly,. As you can tell I am new to macros.
When I copied this into the visual Basic. it comes up with an error (sub or
function not defined), Could you help with this. Again Thank you.
 
Not too sure what the problem might be. It worksin mine... In the VBE select
Debug -> Compile... Which line shows the error? Double check tools ->
references to ensure that none of the references are tagged Missing:
 
Perhaps you only copied the bottom 6 lines of Jim's post, because there
is a blank line in the macro - there are three other lines above this,
starting with:

Sub RemoveShapes

Hope this helps.

Pete
 
Jim
THANK YOU IT WORKS!!!!!!!
--
thank you mac


Jim Thomlinson said:
Not too sure what the problem might be. It worksin mine... In the VBE select
Debug -> Compile... Which line shows the error? Double check tools ->
references to ensure that none of the references are tagged Missing:
 
Hi Jim
I know you helped me with this macro. I came across a problem and was
wondering if you could help me again. When I run this macro it also removes
text boxes, which I don't want to do. Is there anyway I can fix it so that
it does not remove the text boxes. I appreciate any help you can give me.
Thank you.
 

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

Back
Top