Switch from Office 2000 to Office 2003 error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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?)
 

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

Back
Top