• Intermitant Error (Excel VBA)

    Author
    Topic
    #362199

    Afternoon All,

    I have a VBA macro that copies a template sheet. Every now and then I get an error … “copy method of worksheet failed”. The actual code is …

    Sheets("$TEMPLATE.fac").Copy after:=Sheets(lsPrevSheetName)
    

    where lsPrevSheetName is a valid value.

    sometimes it works, sometimes is stops working half way through. I usually have to exit excel and restart it but sometimes I need to reboot.

    Any takers on what is going wrong?

    Viewing 0 reply threads
    Author
    Replies
    • #549460

      How silly is this. There is a knowledge base article that discusses this issue and suggests a work around – basically close the workbook (saving changes) and then re-open it. It looks like MS are extending the concept of ‘fix all problems with a reboot’.

      The knowledge base article is here …

      http://support.microsoft.com/support/kb/ar…s/Q210/6/84.ASP

    Viewing 0 reply threads
    Reply To: Intermitant Error (Excel VBA)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: