Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP!! Excel 2000 Copy of worksheet class failed run time Error 1004

Please can someone help me...

I am using excel 2000 and have write a macro in VBA to copy a
worksheet and then rename the copied sheet. My problem is that are
loop 23 time I get the error Copy of worksheet clas failed Run time
Error 1004.

I have looked at some example were other people had the same problem
but when I use the code i must be doing something wrong.

My code reads

Sheets("ReconMaster").Select
Sheets("ReconMaster").Copy After:=Sheets(7)
Sheets("ReconMaster (2)").Select
Sheets("ReconMaster (2)").Name = strSheetN

Once the sheet is copied I rename based on an Emplyee number. I have
about 100 sheets to create.

Can someone help me get over this problem.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP!! Excel 2000 Copy of worksheet class failed run time Error 1004

Maybe this will help?

Sub ReconMaster()

Dim i As Integer
Dim j As Integer

Do
i = (i + 1)
Sheets("ReconMaster").Copy After:=ActiveSheet
j = InputBox("Enter employee number")
If j = 0 Then
ActiveSheet.Delete
Exit Sub
End If
ActiveSheet.Name = j
Loop Until i = 100
End Sub


-----Original Message-----
Please can someone help me...

I am using excel 2000 and have write a macro in VBA to

copy a
worksheet and then rename the copied sheet. My problem

is that are
loop 23 time I get the error Copy of worksheet clas

failed Run time
Error 1004.

I have looked at some example were other people had the

same problem
but when I use the code i must be doing something wrong.

My code reads

Sheets("ReconMaster").Select
Sheets("ReconMaster").Copy After:=Sheets(7)
Sheets("ReconMaster (2)").Select
Sheets("ReconMaster (2)").Name = strSheetN

Once the sheet is copied I rename based on an Emplyee

number. I have
about 100 sheets to create.

Can someone help me get over this problem.
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error '1004': AutoFill method of Range class failed murkaboris Excel Discussion (Misc queries) 10 April 16th 09 09:06 PM
Run-time error '1004': AutoFill method of Range class failed murkaboris Excel Discussion (Misc queries) 3 April 14th 09 10:35 PM
Error 1004 Copy method of worksheet class failed Ayo Excel Discussion (Misc queries) 3 March 28th 08 02:05 PM
Run-Time error '1004' : Select method of Range class failed [email protected] Excel Discussion (Misc queries) 3 March 9th 07 01:36 PM
Run-time error "1004" Select method of range class failed Tallan Excel Discussion (Misc queries) 3 March 7th 07 05:22 PM


All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"