+ Reply to Thread
Results 1 to 2 of 2

Copy method of Worksheet class failed

Hybrid View

  1. #1
    Francis Brown
    Guest

    Copy method of Worksheet class failed

    Hello I Have the following code:

    Worksheets("Data History").Copy after:=Worksheets("Adviser")

    and if produces this error:

    Run-time error '1004':

    Copy method of Worksheet class failed

    Both Sheets referenced in the code exist in the workbook. Any Ideas why this
    is happening. It only started recently. The code worked before.

    Regards and thanks for all help.

    Francis.





  2. #2
    Francis Brown
    Guest

    RE: Copy method of Worksheet class failed

    Hello.
    I solved my own problem.
    entered line:
    Worksheets("Data History").Activate
    before the offending line and code now works.

    ? Why does it need this as the Worksheet is referenced explicitly.

    Regards

    Francis.

    "Francis Brown" wrote:

    > Hello I Have the following code:
    >
    > Worksheets("Data History").Copy after:=Worksheets("Adviser")
    >
    > and if produces this error:
    >
    > Run-time error '1004':
    >
    > Copy method of Worksheet class failed
    >
    > Both Sheets referenced in the code exist in the workbook. Any Ideas why this
    > is happening. It only started recently. The code worked before.
    >
    > Regards and thanks for all help.
    >
    > Francis.
    >
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1