Sheets.Copy Error in Excel 2003 - Is this a registry Problem?

H

HamishMcT

Good afternoon,

I've searched all available resources, you're my last hope!

For the first time ever, the sheets.copy command in the vbe throws a
large error.

Firstly it says Microsoft Visual Basic - File not Found C:
\Documents.....tmp and then throws a Run Time 1004 "Method Copy of
object Sheets Failed".

Is this something to do with registry access or temporary file (which
I fear has been removed)? If so, could anyone please explain what
needs to be put right? If not, any ideas as to what could be the
problem would be greatly appreciated and I'll buy you a pint. . .

Thanks very much in advance

Jon Teale
 
G

Guest

I don't think its the sheets.copy that is failing, but something earlier in
the code that is really causing the problem. I would check to see if there is
any ON ERROR statements in the code and comment them out to help find the
problem. Run the code without the ON ERRROR statements and see if the Error
occurs earlier in the program.
 
H

HamishMcT

Thanks for the advice Joel, but even if I write the routine

sub copy_sheets()
sheets.copy
end sub

I get the errors.

Any other dieas?

Thanks very much

JT
 
G

Guest

The code ran fine for me. You are right that you need to start looking at
windows. Make sure you are running in a directory that you have full
permission to read and write. When you to a sheet.copy and don't use the
after or before it creattes a new workbook. If you don't have perrmission
then that could be your source of the problem
 

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