Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's my dilemma: I have a worksheet which on the click of 'Command
Button1' unprotects the worksheet, inserts a desired image into a group of merged cells identified as cell L43 and then reprotects the worksheet. I then have a second command button (Command Button2) that when clicked unprotects the worksheet, removes the image from this same group of cells and then reprotects the worksheet. Unfortunately, when I click this Command2 button, it not only removes the image in cell L43, it also removes every other image in the worksheet. I only want the images in cell L43 to be removed. Any help would be appreciated! Here's the Command2 button code: Private Sub CommandButton2_Click() Application.ActiveSheet.Unprotect "password" For Each Picture In Pictures 'ActiveSheet.Pictures.Delete 'Debug.Print Picture.Name If Left(Picture.Name, 7) = "Picture" Then Picture.Delete End If Next Application.ActiveSheet.Protect "password" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When reopening document, images move | Excel Discussion (Misc queries) | |||
script for deleting images | Excel Discussion (Misc queries) | |||
Deleting Multiple Images | Excel Discussion (Misc queries) | |||
some images in excel document print inversed | Excel Discussion (Misc queries) | |||
Find images in a Excel document.. How !! | Excel Programming |