Switch from Office 2000 to Office 2003 error
Your code looks ok to me.
I think I'd double check what was in X.
maybe a couple of:
debug.print X
would help
(and the worksheet doesn't get protected?)
Robert wrote:
We recently upgraded from Office 2000 to Office 2003. I have vba in Excel
that copies a range and posts in the same spreadsheet. I get error
"Run-time error '1004'
Copy method of Range class failed"
This code runs fine in Office 2000, but in Office 2003 the code will make
the first pass correctly, but bugs out on the second pass.
'here is the code that needs debugged
Worksheets("Store Master Data").Range("A2:F1597").Copy _
Destination:=Worksheets("Final List").Range("B" & X)
'x is a variable tied to a cell value
'x determines which row to paste the results in
Any help would be depreciated. I can't figure it out.
Thanks in advance,
Robert
--
Dave Peterson
|