PC Review


Reply
Thread Tools Rate Thread

copy method problem

 
 
beezak
Guest
Posts: n/a
 
      4th Dec 2007
I've strange problem with copy method in Excel 2003.



Sub Macro1()

Sheets("sht1").Select
Sheets("sht1").Copy After:=Sheets(3)



End Sub



When I run this code, it stop on copy method and unexpectedly break
application. Of course macro didn't duplicate "sht1".



Can anyone give me some help?



 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      5th Dec 2007
Is there anything interesting with Sht1? Does it exist? Is it hidden?

Do you have at least 3 sheets in that workbook?

If those don't help, what does the error message say?

beezak wrote:
>
> I've strange problem with copy method in Excel 2003.
>
> Sub Macro1()
>
> Sheets("sht1").Select
> Sheets("sht1").Copy After:=Sheets(3)
>
> End Sub
>
> When I run this code, it stop on copy method and unexpectedly break
> application. Of course macro didn't duplicate "sht1".
>
> Can anyone give me some help?


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy method of worksheet class failed: trying to copy a hidden she sam Microsoft Excel Programming 4 8th Aug 2009 11:19 PM
copy method of worksheet class failed: trying to copy a hidden she sam Microsoft Excel Programming 0 7th Aug 2009 11:16 PM
copy method of worksheet class failed: trying to copy a hidden she sam Microsoft Excel Programming 0 7th Aug 2009 11:16 PM
Problem with System.IO.File.Copy method Blair Microsoft C# .NET 1 30th Sep 2008 02:51 AM
Why QUIT method doesn't work after COPY method? surotkin Microsoft Excel Programming 3 26th Oct 2005 04:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:27 AM.