0
votes

The issue is to paste the copied range into another sheet with the original format (e.g.source columns width to the target column). I have tried to include the code "Paste:=xlPasteColumnWidths" in combination with "Paste:=xlPasteValues". But it wasn't successful. For example, by writing ".PasteSpecial xlPasteColumnWidths" only yields no copied values.

  With wq.Sheets("Table 5").Range("A1:W51").Copy
  End With

  With ws.Range("A6")
 .PasteSpecial xlPasteColumnWidths
  End With
1

1 Answers

1
votes

The answer to my question is:

 With wq.Sheets("Table 5").Range("A1:W51").Copy
 ws.Range("A01").PasteSpecial xlPasteAll
 ws.Range("A01").PasteSpecial xlPasteColumnWidths
 ws.Range("A:W").EntireRow.AutoFit
End With