vba to Copy row!

samahiji

Board Regular
Joined
Oct 6, 2015
Messages
50
Hello

Can anyone figure out why the following code to copy row("10:10") showing an error?!!

Code:
    Sheets("TST").Rows(10).SpecialCells(xlCellTypeConstants, 23).Copy _
    Destination: MM.Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=True, Transpose:=True


:eek:
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Caleeco

Well-known Member
Joined
Jan 9, 2016
Messages
966
Hello,

You are missing the '=' on the destination argument

Try this instead. However, i donthink pastespecial works with the 1 line copy/paste method. Try this instead
Code:
Sub TestCopy()
 Sheets("TST").Rows(10).SpecialCells(xlCellTypeConstants, 23).Copy
 MM.Range("A1").PasteSpecial Paste:=xlPasteValues
End Sub

Caleeco
 

samahiji

Board Regular
Joined
Oct 6, 2015
Messages
50
WOOOW

it works finally :)

Thanks a lot Caleeco

I added the skipblanks and transpose code :)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,893
Messages
5,598,712
Members
414,254
Latest member
MarieCo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top