LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ksh ksh is offline
external usenet poster
 
Posts: 16
Default Run-time error 9 when trying to copy a worksheet

The following code is part of a macro I have set up. The first two lines
(select "CR" and rename as "EQUIP-CR") work perfectly, but I get a run-time
error 9 (Subscript out of range) when it gets to the copy worksheet line.

Sheets("CR").Select
ActiveSheet.Name = "EQUIP-" & ActiveSheet.Name

Sheets("EQUIP-CR").Copy After:=ThisWorkbook.Sheets(Sheets.Count)

I'm sure it is something very simple, but my VBA skills are limited and I
haven't been able to figure this one out. Any help is appreciated.
 
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 (Copy Method of Worksheet class failed) Karthik Bhat - Bangalore Excel Programming 5 January 3rd 06 11:43 AM
Run Time Error 1004 Copy method of Worksheet class failed Paul Hitchcock Excel Programming 2 May 4th 05 08:10 PM
Run-Time Error 1004 Copy method of worksheet class failed Don Lloyd Excel Programming 0 July 27th 04 07:27 PM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
HELP!! Excel 2000 Copy of worksheet class failed run time Error 1004 Martin[_6_] Excel Programming 1 August 2nd 03 03:16 PM


All times are GMT +1. The time now is 03:17 AM.

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

About Us

"It's about Microsoft Excel"