I am trying to copy the range CW263:DC263 and paste on range CX269:CX294 by vba, but I am getting an error.
I am using a code like that (It may repeat the same in all worksheets):
Sub copiar_colar_reorganizado()
Dim oneRange As Range
Dim aCell As Range
Dim WS_Count As Integer
Dim I As Integer
' Set WS_Count equal to the number of worksheets in the active
' workbook.
WS_Count = ActiveWorkbook.Worksheets.Count
' Begin the loop.
For I = 1 To WS_Count
Set oneRange = Worksheets(I).Range("CZ269:DA294")
Set aCell = Worksheets(I).Range("DA269")
Worksheets(I).Range("CW263:DV263").Copy Worksheets(I).Range("CX269:CX294").PasteSpecial(Transpose:=True)
Next I
End Sub
But I am getting something like: It is not possible to obtain PasteSpecial property from Range class. How to get this?
Make the Copy paste two lines and remove the
()
around the transpose:One line is for full copy only not PasteSpecial.