Results 1 to 4 of 4

copy paste row height

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    copy paste row height

    I am discouraged because i have two half solution but I can't mix them.
    From one sheet I have to copy the source chart to another sheet below each copy procedure.
    Everything is OK except that the row height in the destination is different from the source one.
    I upload the sample file illustrate the function.
    Please help me to mix the 2 part to the row height will be the same after each copy/paste.

    First part:
    Sub packinglabel()
     Dim i As Long, r As Long
     Dim a
     
     With Worksheets("sheet2")
        r = 1
         
       For i = 2 To UBound(a)
           
    With Worksheets("Sheet2")
        .Range("A1:G16").Copy
        Worksheets("Sheet3").Range("A" & r).PasteSpecial (xlPasteValues)
        Worksheets("Sheet3").Range("A" & r).PasteSpecial (xlPasteFormats)
        Worksheets("Sheet3").Range("A" & r).PasteSpecial (xlPasteColumnWidths)
         Application.CutCopyMode = False
    End With
                 r = r + 16
        Next
     End With
    End Sub
    Second part:
    For r = 1 To .Rows.Count
                Dest.Rows(r).RowHeight = Source.Rows(r).RowHeight
    Next r
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1