vba to Copy row!

samahiji

Board Regular
Joined
Oct 6, 2015
Messages
82
Office Version
  1. 2019
Platform
  1. Windows
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:
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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
 
Upvote 0
WOOOW

it works finally :)

Thanks a lot Caleeco

I added the skipblanks and transpose code :)
 
Upvote 0

Forum statistics

Threads
1,215,231
Messages
6,123,756
Members
449,120
Latest member
Aa2

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
Back
Top