Consulting

Results 1 to 2 of 2

Thread: Pasting an Image Into Cell, Merging Cells, and then Resizing

  1. #1

    Pasting an Image Into Cell, Merging Cells, and then Resizing

    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.
    Error 1004.PNG

    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:
    HTML Code:
    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.

  2. #2
    VBAX Tutor MINCUS1308's Avatar
    Joined
    Jun 2014
    Location
    UNDER MY DESK
    Posts
    254
    check out
    .PasteSpecial()
    specifically the xlPasteType
    - I HAVE NO IDEA WHAT I'M DOING

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •