Selecting pictures within highlighted cells

FluxxyDub

New Member
Joined
May 8, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I’m trying to delete a picture within a certain number of highlighted cells. I’m trying to do this in VBA and every suggested code I’ve tried doesn’t work or requires specific cells to be selected however I’m highlighting the cells via ActiveCell.Offset codes.

The sort of thing I’m after is:

Range(ActiveCell.Offset(0,0),ActiveCell.Offset(5,5)).Select
ActiveSheet.Pictures.Select
Selection.Delete

But this either doesn’t work or highlights and deletes every picture on the Worksheet, however I only require the single picture to be removed from within the highlighted cell range.

Please help!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Will the picture that you need to delete vary or will it always be the same one?
Thanks for your reply. It'll always be a different picture. It's basically being pushed from a different macro to populate but I'm trying to make another macro in reverse in case someone makes a mistake.
 
Upvote 0

Forum statistics

Threads
1,223,742
Messages
6,174,243
Members
452,553
Latest member
red83

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top