locked
VBA code of Excel 2013 "workbooks.open" not working with Excel 2010 RRS feed

  • Question

  • Dear,

    Can anybody know why VBA code of Excel 2013 "workbooks.open" not working with Excel 2010?

    I found below error. Please let me know.

    Error 1: System Error &H80070BBC (-2147021892).

    Error 2: Run-timeerror '-2147021892 (80070bbc)':

    Automation error

    An AddJob call was not issued.

    Please find below code that is working fine with Excel 2013 where give errors in Excel 2010

    ---------------------------------------------------------------------------------------------------------

    Sub Update_Click()

        Dim path As String
        Dim currentWb As Workbook
        Dim openWb As Workbook
        Dim openWs As Worksheet

        path = "C:\Users\20049467\Desktop\KP-I1-0201.xls"

        Set currentWb = ThisWorkbook
        Set openWb = Workbooks.Open(path)
        Set openWs = openWb.Sheets("Cable_Schedule")

        openWs.Range("L6") = currentWb.Sheets("Document List").Range("B2")
        openWs.Range("L7") = currentWb.Sheets("Document List").Range("C2")
        openWs.Range("E19") = currentWb.Sheets("Document List").Range("D6")

        ActiveWorkbook.Save
                
        openWb.Close (False)

        ActiveSheet.Shapes("CCS").ControlFormat.Value = 0

    End Sub

    • Edited by Piyush Kamani Wednesday, April 22, 2015 10:17 AM Code Added
    Wednesday, April 22, 2015 10:03 AM