Range.CopyPicture question

Gokhan Aycan

Active Member
Joined
Aug 8, 2021
Messages
460
Office Version
  1. 365
Platform
  1. Windows
Is there a limit on how many rows that can be copied or an image size limit? Or some other setting etc I need to check?

When the range is 6000 rows by 20 columns, the resulting image is around 1600 rows (just short of 25000 points).

Essentially using:

VBA Code:
rng.CopyPicture xlScreen, xlPicture

rng2.PasteSpecial

xlPrinter is even less, 200ish rows (I guess Print Area comes into play here).
xlBitmap has worse resolution and file size impact is almost double.
 
When you try to put it on the VBA Userform directly, where is the code located? In the Userform itself? Also, what happens if you paused for a few seconds before trying to apply it to the Userform? I've observed some odd behavior with the VBA Userform when trying to do graphics-related the first few seconds after it loads.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hmm, iirc code is on a standard module (should be mdlVideo). Did I try the waiting? Not with the code, but definitely using the Immediate window.
 
Upvote 0
Hmm... what if you tried situating the video in a frame? Frames have hwnd properties too that you can access (though it isn't obvious).
 
Upvote 0
Sorry, I would be checking this myself but I'm not near a computer atm.
 
Upvote 0
Heh, no problem. I will check it myself too the next time I work on it. It seems I need to gather some more strength.
 
Upvote 0

Forum statistics

Threads
1,214,814
Messages
6,121,711
Members
449,049
Latest member
THMarana

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