How to write VBA to copy range and save into .JPG ?

sthanawa

Board Regular
Joined
Jul 5, 2006
Messages
80
Hello All ,

I would like to know how to write VBA code to copy a specific range in Excel and then save it in .JPG format ?

Please suggest.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi,

You can copy charts or ranges and save them as pictures using the copypicture method like this:

Code:
Sub Copy_Range_As_Picture()

Range("A1:B10").CopyPicture xlPrinter, xlPicture

Sheets("Saved Stuff").Activate

Application.ScreenUpdating = True

Range("A1").Activate

ActiveSheet.Paste

End Sub

Hope it helps,

Dom
 
Upvote 0
Hi Domski ,

Thank you for your suggestion. I tried to run your code already. It just copy and paste them as picture to other sheet.

How can I paste into other program and save to .JPG ?
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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