B
BeSmart
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
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