QUOTE(salserompls @ 2 Jul, 2008 - 07:18 PM)

I need to delete all pictures from an Excel spread sheet. I know hardly any VBA. So far, I have found this code as I have been searching on the internet for help...
ActiveSheet.Shapes.SelectAll
Selection.Delete
But just putting this code in the VBA editor and creating a file to run does nothing. I just get an error that says: COMPILE ERROR: INVALID OUTSIDE PROCEDURE
Can someone please show me what other code I need to make this work? Or maybe I also need to recreate the macro in a different way. I am using the 2003 version of Excel.
Thank you!
I'll give you the basic steps to get you started.
Tools->Customize-> Tick Control Toolbox -> Attach -> close
This will add the Control Toolbox to the collection of toolbox, within this tool box find the "Button Control".
Double Right Click on it. Go back the spreadsheet -> Press & Hold the right button & drag diagonally release the button.
Now you should have control on over the spreadsheet with "CommandButton1" on it.
Double right click on the control this will open the VBA code editor of EXCEL. Insert the code inside the subroutine and run again.
Now you can use the button.