PDA

View Full Version : Pasting an Image Into Cell, Merging Cells, and then Resizing



K_Barnett
11-14-2017, 10:47 AM
I'm having some difficulty pasting an image that i get from another workbook into a cell. This is the (common) error that I am receiving.
20958

Once i successfully paste it into this cell, i would like to merge a range of cells (shouldn't be hard) and resize the picture to fit within that range.

Here's the part of my code dealing with this problem:


Operator = InputBox("Who will sign off on this FIR? (Input your name):", "FIR")
'create new excel application
objectSet appExcel = New Application
'set the applications visible property to false
appExcel.Visible = False
'Code for retrieving signature to sign off on FIRApplication.ScreenUpdating = False
Set Signature_List = Workbooks.Open("U:\KBarnett\Electronic FIRs Signature List\Electronic FIRs Signature List.xlsx")
With Signature_List.Sheets(1)
n = 1
Do Until .Cells(n, 1).Value = Operator
n = n + 1
Loop
End With
With Cells(n, 2).Copy
End With
Signature_List.Close SaveChanges:=False
Sheet1.Paste Destination:=Sheet1.Range("F49"), Link:=True
Range("F49:L51").Select.Merge
Selection.ShapeRange.ScaleWidth 2.3, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.2, msoFalse, msoScaleFromTopLeft


I appreciate any help.

MINCUS1308
11-14-2017, 12:50 PM
check out
.PasteSpecial()
specifically the xlPasteType