looping through worksheets

A

alex

I have problem looping through worksheets. I am getting
error 9. Please help.This is my code:
Sub copy2()
Dim update As Range
Dim cell As Range
Dim a As String
Dim i As Integer
Dim b As String
For i = 1 To 3
Set cell = Workbooks("0620.Xls").Sheets("d.o.").Range
("c27").Offset(0, 1)
a = Str(i)
b = "control_point" & a
Set update = Workbooks("0620.Xls").Sheets(b).Range("d26")
update.copy
cell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top