deleting pictures

K

kevin carter

hi
i have a workbook that allows a user to select a picture and other data.
Once the picture has been selected it is pasted into another location on the
worksheet.

What i want to do is when the user has finished and the workbook saved, i
want to reset the worksheet to default values
this means deleting the picture and the other data.
i do this by clicking one button which runs a macro

the text is no problem
is it possable to delete a picture ?

thanks kevin
 
D

Dave Peterson

You can delete a picture in code by something like:
activesheet.pictures(1).delete

or if you know the name:
activesheet.pictures("myPictureName").delete

but if you're going to reset the workbook, why not just make the workbook
readonly.

If they want to save their copy, they can--as a new name.

But the won't be able to touch the original.

(You could save your workbook as a template (.xlt) and have them create a brand
new workbook based on your template.)
 
K

kevin carter

thanks for your help


Dave Peterson said:
You can delete a picture in code by something like:
activesheet.pictures(1).delete

or if you know the name:
activesheet.pictures("myPictureName").delete

but if you're going to reset the workbook, why not just make the workbook
readonly.

If they want to save their copy, they can--as a new name.

But the won't be able to touch the original.

(You could save your workbook as a template (.xlt) and have them create a brand
new workbook based on your template.)
 
Top