View Single Post
  #2   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

if I understand correctly multicple slection cannot be copied andpasted
only contiguous cells can be copied like this
so one by one copy
e.g. worksheets("staffdetails").range("I4:I10").copy
worksheets("payslip").range("B2").pastespecial ETC ETC
worksheets("staffdetails").range("c4").copy
worksheets("payslip").range("C11").pastespecial ETC ETC

simlarly other non contiguous cells.

try this


"bigdaddy3" wrote in message
...
can somone tell me why the attached code will not work it works for the

first
range only but when others added it fails also how do you clear outline of
copied cells, i used range ("D9").Select but no good.Could someone help
please

-- Private Sub Workbook_Open()
Workbooks("Staff Details").Activate
Range("I4:I10")("C4")("C9")("G9").Select
Selection.Copy
Worksheets("Payslip").Activate
Range("B2:B8", "C11", "K11", "K12").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Range("D9").Select
End Sub
BD3