Size a bitmap

I am using the following code to copy a range and paste in another sheet as a bitmap;

Dim shape As Excel.shape
    Sheets("Report").Select
    Range("A1:I21").Select
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
    Range("A1").Select
    Sheets("Copy").Select
        For Each shape In ActiveSheet.shapes
          shape.Delete
        Next
    Range("C2").Select
    ActiveSheet.Paste
    Range("A1").Select

I want to size it to the following:
Size and rotate
Height 2.43"
Width 9.16"

Scale
Height 69%
Width 77%
LVL 4
cd_morrisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
You probably need something like

with ActiveSheet.shapes(1)
    .height =
    .width =
end with

You may try the values which will give you the desired result
0
cd_morrisAuthor Commented:
I am having to change the values each time the picture size changes.
0
Steven HarrisPresidentCommented:
I am having to change the values each time the picture size changes.

If all of the objects are different sizes and need to be adjusted to different, then this is expected.  What exactly did you have in mind?
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

cd_morrisAuthor Commented:
I want to set the size of the picture to fill the merge cell.
0
Steven HarrisPresidentCommented:
You may try something along the lines of the following:

Sub Q_28252927() 
    With ActiveSheet.shapes(1)
        .Left = .TopLeftCell.Left 
        .Top = .TopLeftCell.Top 
        .Height = .TopLeftCell.Height 
        .Width = .TopLeftCell.Width 
    End With 
End Sub 

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Saqib Husain, SyedEngineerCommented:
You ought to be giving all information in the beginning. I gave you the same answer without your new requirement.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.