chem101
10-19-2010, 08:43 AM
Hello Everyone,
I'm trying to clear a .jpeg from a specific range on a worksheet. A VBAX member was kind enough to provide me with the code shown below. It does a great job but it does delete all of the pics on the spreadsheet. Can it be modified so that only the .jpeg in the specified range gets cleared? I tried to modify it without success.
I appreciate your help!!
Sub Proc2()
' Remove pictures
Dim DrObj
Dim Pict
Set DrObj = wksWHMaster.DrawingObjects
For Each Pict In DrObj
If Left(Pict.Name, 7) = "Picture" Then
Pict.Select
Pict.Delete
End If
Next
End Sub
I'm trying to clear a .jpeg from a specific range on a worksheet. A VBAX member was kind enough to provide me with the code shown below. It does a great job but it does delete all of the pics on the spreadsheet. Can it be modified so that only the .jpeg in the specified range gets cleared? I tried to modify it without success.
I appreciate your help!!
Sub Proc2()
' Remove pictures
Dim DrObj
Dim Pict
Set DrObj = wksWHMaster.DrawingObjects
For Each Pict In DrObj
If Left(Pict.Name, 7) = "Picture" Then
Pict.Select
Pict.Delete
End If
Next
End Sub