ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheets.Copy Error in Excel 2003 - Is this a registry Problem? (https://www.excelbanter.com/excel-programming/395055-sheets-copy-error-excel-2003-registry-problem.html)

HamishMcT

Sheets.Copy Error in Excel 2003 - Is this a registry Problem?
 
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


joel

Sheets.Copy Error in Excel 2003 - Is this a registry Problem?
 
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.

"HamishMcT" wrote:

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



HamishMcT

Sheets.Copy Error in Excel 2003 - Is this a registry Problem?
 
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




On 8 Aug, 17:24, Joel wrote:
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.




joel

Sheets.Copy Error in Excel 2003 - Is this a registry Problem?
 
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

"HamishMcT" wrote:

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




On 8 Aug, 17:24, Joel wrote:
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.






All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com