View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default copy from worksheet

Sub move_it()
Dim ws As Worksheet
Set ws = Sheets(Range("A1").Value)
s = Array("B1", "Z1")
For i = LBound(s) To UBound(s)
ws.Range(s(i)).Copy Sheets("Data temp").Range(s(i))
Next
End Sub

Note that s is a string array that the contains the disjoint range to be
copied.
--
Gary''s Student - gsnu200722