View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default Copy Destination fails

Hello Excel Experts and Users,

The Copy Destination lines of this code cause a failure(yellow hi-light).
My intent is to copy the 39 row range in workbook "Models" sheet "Adams", go
to workbook "A1Results", sheet "Adams" and paste special, transpose to a row
in column C. Then do the same thing in the next sheet in "Models" until it
gets to sheet "Carroll", doing a copy, paste special from that sheet and
ending the loop.

Copies from the 10 sheets in workbook "Models" into the 10 sheets in
workbook "A1Results" with the same names.

Can't get past the copy destination to even see if my Do Until Loop will
work.

Sub Models_To_Results()
Dim WS As Worksheet
Set WS = Worksheets("Adams")

Do Until WS.Name = "Carroll"
Range("IV29").End(xlToLeft).Resize(39, 1).Copy
Workbooks("A1Results.xls").Activate
Range("C100").End(xlUp).Offset(1, 0). _
PasteSpecial , xlPasteValues, Transpose:=True
Set WS = WS.Next
Loop

End Sub

Thanks for any help.
Regards,
Howard