Oops. Workbooks, not Workbook
Merjet
Okay, I've got it working. But I think there might be neater ways of
doing it. Because one range of data has to be transposed I'm copying
over in two stages. It would be good if I could do it in a single step
but I'm not sure how.
Also could someone tell me how I select a range for copying that is not
contiguous, i.e below I use
Range(Cells(rw, 1), Cells(rw, 20)).Select, but actually I only want to
select then copy the first cell and the last 15 cells in the row
skipping cells 2-5.
Workbooks("order.xls").Sheets("Orderform").Activate
Dim rw As Long
rw = 17
Do Until ActiveSheet.Cells(rw, 1) = ""
Range(Cells(8, 2), Cells(12, 2)).Select
Application.CutCopyMode = False
Selection.Copy
Workbooks("master.xls").Sheets("Orders").Activate
Range("F1").End(xlDown).Offset(1, -5).Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats,
Operation:= _
xlNone, SkipBlanks:=False, Transpose:=True
Workbooks("order.xls").Sheets("Orderform").Activate
Range(Cells(rw, 1), Cells(rw, 20)).Select
Application.CutCopyMode = False
Selection.Copy
Workbooks("master.xls").Sheets("Orders").Activate
Range("F1").End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats,
Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Workbooks("order.xls").Sheets("Orderform").Activate
rw = rw + 1
Loop