Consulting

Results 1 to 3 of 3

Thread: Solved: Copy Data Without Cell Borders

  1. #1

    Solved: Copy Data Without Cell Borders

    Hi

    I wrote a little method which copies values from one sheet to another, however it also copies each cells border which makes the new spreadsheet look ugly, just wondering if there is a method of avoiding copying the borders.

    Below is my code

    [VBA]
    Sub ReportSub()
    Dim SelRG As Range, RW As Range

    Set SelRG = Intersect(Selection.EntireRow, Selection.Worksheet.Columns("A:L"))

    For Each RW In SelRG.Rows 'loop through each 'row' (cols A:K) of selection
    With Sheets("PrintRecord") 'destination sheet
    RW.Cells(1).Copy .Range("C8")
    RW.Cells(2).Copy .Range("C12")
    RW.Cells(3).Copy .Range("C13")
    RW.Cells(4).Copy .Range("C14")
    RW.Cells(5).Copy .Range("C15")
    RW.Cells(6).Copy .Range("E12")
    RW.Cells(7).Copy .Range("E13")
    RW.Cells(8).Copy .Range("E14")
    RW.Cells(9).Copy .Range("C22")
    RW.Cells(10).Copy .Range("D22")
    RW.Cells(11).Copy .Range("E22")
    ' RW.Cells(11).Copy .Range("C37")

    End With
    Next
    Sheets("PrintRecord").Select
    End Sub
    [/VBA]

    Help appreciated

  2. #2
    VBAX Regular
    Joined
    Feb 2008
    Posts
    58
    Location
    I used this:
    [VBA] SrcBook.Worksheets(2).Range("Name").Copy
    DestBook.Worksheets(1).Range("A" & FinalRow + 1).PasteSpecial Paste:=xlPasteValues[/VBA]

  3. #3
    That looks great, thanks!

Posting Permissions

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