View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2081_] Rick Rothstein \(MVP - VB\)[_2081_] is offline
external usenet poster
 
Posts: 1
Default Combining two line of code

Try it this way...

Sheets(1).Range("B4:B5").Copy
Sheets(3).Range("A3").PasteSpecial Paste:=xlPasteValues, Transpose:=True

Rick


"Ardy" wrote in message
...
Hello All;
How would you combine this two line of code Excel-2007

Sheets(1).Range("B4").Copy
Sheets(3).Range("A3").PasteSpecial Paste:=xlPasteValues
Sheets(1).Range("B5").Copy
Sheets(3).Range("B3").PasteSpecial Paste:=xlPasteValues

I have tried

Sheets(1).Range("B4, B5").Copy
Sheets(3).Range("A3, B3").PasteSpecial Paste:=xlPasteValues
The first line is OK but the second gives me an error.

Ardy