VBA Copy visible cells as a picture

willow1985

Active Member
Joined
Jul 24, 2019
Messages
312
Hello,

I have a macro that filters column Q removing blank cells. Once it is filtered to show only the cells with data I am looking for a code that will copy all visible cells from Q2 down and copy them as a picture.

Any idea what code I could use?

Thank you for all your help!

Carla
 

willow1985

Active Member
Joined
Jul 24, 2019
Messages
312
Nevermind, I figured it out. Once my Data is filtered to remove blanks, I use the following code:

Code:
LastRowColumnQ = Cells(Rows.Count, 1).End(xlUp).Row
    Range("Q2:Q" & LastRowColumnQ).Select
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Hope this post helps someone out there :)
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
8,802
Depending on your particular situation, you might be able to do this without any code at all. Before filtering, select and copy Q2:Q100 (or your maximum range). Right click the cell where you want the picture. Where it says "Paste Special" hover the mouse over the arrow on the right, then choose the bottom right icon (Linked Picture). It will automatically adapt as you filter your range. If you want a picture that doesn't change, select your range after it's filtered, copy it, then Paste Special with the Picture option (bottom row, second from right). If you still want VBA code, we can automate that process.
 

Forum statistics

Threads
1,078,308
Messages
5,339,400
Members
399,302
Latest member
Swiftymj

Some videos you may like

This Week's Hot Topics

Top