Skip to Content
avatar image
Former Member

EPM Template has intermittent Visual Basic Run-time error

Hi, I have an EPM template with some macros. I intermittently get the below Visual Basic Run-time error -1073479167 (c0040201)' when I refresh the template. Sometimes it refreshes fine, other times I get the error (without changing anything). The strange thing is that the exact same macros/code are in several other templates which don't produce this error. Do you have any idea why this error might be occurring? Could it be related to something in the system outside of the template/macros?

Thank you for any help!

vba error.png (6.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Jun 03, 2015 at 08:12 AM

    Hi Lin,

    Without looking on the VBA code in the template - nothing to discuss 😔

    Vadim

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 03, 2015 at 04:02 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 05, 2015 at 02:24 PM

    We have similar issue with a run time error - '1073479167 (c0040201)':

    Error in ClearAllCachesToGet - Excel

    VB code is as follows

    Sub Refresh()

    Application.ScreenUpdating = False

    Application.EnableEvents = False

    Sheets("sheet1").Select

    EPMobject.RefreshActiveSheet

    Sheets("sheet2").Select

    EPMobject.RefreshActiveSheet

    Sheets("sheet3").Select

    EPMobject.RefreshActiveSheet

    Sheets("sheet4").Select

    EPMobject.RefreshActiveSheet

    Sheets("Source").Select

    Application.ScreenUpdating = True

    Application.EnableEvents = True

    End Sub

    It usually fails in the first "refreshactivesheet" and all the EPM sheets lose the connection right afterwards.

    EPM will say it is still logged on but the EPM tabs will look like all icons greyed out.

    Appreciate your help on this.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Hello,

      I write some VBA code for my personal use. I think when the code depends on retrieving information from an existing object, e.g. a specific cell value from a worksheet from a workbook, and the value or object is not valid then VBA fails. In my case, for example, my macros fail if I have another workbook already open because I look for specific worksheets from a workbook.

      You can prevent the error by catching the error if the worksheet does not exist or doesn't contain the information.

      Regards,

      Leila

  • Aug 05, 2015 at 07:02 PM

    Hi Lin

    Please share your code for refresh. Also, is your sheet protected? Make sure that you have provided the same password in protection tab in sheet options as well.

    Add comment
    10|10000 characters needed characters exceeded