VBA Selective Screenshot Range Issue from Excel to MS Paint

CV355

New Member
Joined
Dec 16, 2016
Messages
10
I'm trying to create a macro that searches for certain data and takes a selective screenshot of a specific range in Excel as a reporting function. The data is both cell data and chart data (it's an automatic reporting function). Sometimes it'll be a 10Rx20C screenshot, other times it'll be a 20Rx15C screenshot. I have the code to automatically set the range working just fine. My problem is that Excel/VBA seems to limit the amount of columns that can be selected for a screenshot when pasted into certain other applications.

If I run my macro and paste back into Excel as a picture, it works 100% fine
If I paste into MS Word, it works 100% fine
If I paste into MS Paint, it only pastes 16 columns worth and cuts everything off beyond that regardless of the canvas size

Here's what I'm using just to test this out. It cuts off at the Q Column. If I change the code to C6, it cuts the screenshot off at the R column.
ActiveSheet.Range("B6:AC16").CopyPicture Appearance:=xlScreen, Format:=xlPicture

Here's the bizarre thing though- if I paste back into Excel, copy that picture, and then paste it into Paint, it works fine. Any idea on what might be causing this?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,679
Messages
6,126,182
Members
449,296
Latest member
tinneytwin

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