Delete all Pictures in a sheet
This tutorial shows how to delete only pictures in a specific sheet at once through the use of VBA
METHOD 1. Delete all Pictures in a sheet
VBA
Sub Delete_Pictures()
'declare variables
Dim ws As Worksheet
Dim ws As Object
Dim ws As Worksheet
Dim ws As Object
Set ws = Worksheets("Sheet1")
For Each Pic In ws.Pictures
Pic.Delete
NextPic
End Sub
ADJUSTABLE PARAMETERS
Sheet Selection: Select the sheet in which you want to delete all pictures by changing the 'Sheet1' name in the VBA code. You can also change the name of this object variable, by changing the name 'ws' in the VBA code.
Sheet Selection: Select the sheet in which you want to delete all pictures by changing the 'Sheet1' name in the VBA code. You can also change the name of this object variable, by changing the name 'ws' in the VBA code.
EXPLANATION
This tutorial shows how to remove only pictures from a specific sheet by using VBA.
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Delete all Pictures and Objects in a workbook | How to delete all pictures and objects from an entire workbook at once | |
Assign a macro to a button | How to assign a macro to a Form Control and ActiveX Control button |