LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Error when copying worksheets

Hi All
Any help with this error message would be greatly appreciated:

I'm getting the following error when running a macro that copies one
worksheet and places it after the last worksheet, then re-names it.

Error message:

'Run-time error: '1004':'
'Copy method of worksheet class failed'

This error doesn't happen all the time???
If I close the workbook and re-open it seems to "reset" the worksheet
numbers it's creating and it will run for a while??? It looks like it gets
to a specific worksheet name and doesn't like it...

My macro selects the sheet "Booking Form" and putting a copy of it at the
end of the worksheets that have already created (MBA Wk1, MBA Wk2 etc).

I can't nominate which worksheet it goes next to as other worksheets are
only created if there is a certain value found in them...

The new worksheet is then re-named and the rest of the macro runs.

code:
Sheets("Booking Form").Copy After:=Sheets(Sheets.Count) error happens
here
ActiveSheet.Name = "MBA" & " " & Sheets("Sheet2").Range("A2").Value

Thanks in advance for your help
Regards
BeSmart
 
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
I get an error message while copying worksheets between workbooks CRACARCONSTRUCTION Excel Discussion (Misc queries) 1 February 16th 09 09:56 PM
Error Copying File or Folder message when copying file to CD [email protected] Excel Programming 0 August 2nd 08 05:43 PM
copying worksheets Bob Phillips Excel Programming 0 January 12th 07 12:02 PM
Copying Worksheets babygoode Excel Worksheet Functions 0 July 27th 06 11:18 PM
Copying data & creating new worksheets - error Jen[_11_] Excel Programming 8 May 4th 06 01:34 PM


All times are GMT +1. The time now is 07:35 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"