Cut (For paste) the images next `N' Number of images in the active sheet of the file.

Sekars

New member
Joined
Jul 13, 2016
Messages
14
Reaction score
0
Points
0
Hello Friends

Most of the times i am working in the excel file sheets have number of images, Now i need to cut (First select then Ctrl+X) and paste it in the required sheet in required file.

i.e., the current sheet file have say 500 images (for example) then i need to cut the first 150 images (For example) and paste it in the different file's different sheet.

Now i am manually cut and paste, can we use macro for this application ?

Note : Cross link / reference
http://www.excelforum.com/showthread.php?t=1146365&p=4426118#post4426118
http://www.mrexcel.com/forum/excel-...ber-images-active-sheet-file.html#post4583102

thanks in advance

 
This macro will select all images within a selected range. You can then cut and paste them at one go.
Code:
Sub SelectObjects()
    'Select all objects within a single selected range
    Dim shp As Shape
    Dim rng As Range
    Set rng = Selection
    For Each shp In ActiveSheet.Shapes
        If Not Intersect(Range(shp.TopLeftCell, shp.BottomRightCell), rng) Is Nothing Then _
            shp.Select Replace:=False
    Next shp
End Sub
 
Last edited by a moderator:
Hello Sunny how

Thanks for your VBA code

But i tried to execute it, but it is not working.

thanks again
 
Hi Sekars

Select the range with your images first and then run the macro.
It will select all the images within that range.
You can then cut all at once and paste to your new sheet.
 
Back
Top