Export Worksheet or Chart into Image with Desired Width and Height

Contents
[ ]

The following code exports the worksheet into an image with a size of 400 × 400 pixels.