2 Replies Latest reply: Oct 1, 2015 5:11 AM by Marcus Sommer RSS

    Type Mismatch on copyObjectsToExcelSheet

    Vijay Kumar

      Error:Type Mismatch on copyObjectsToExcelSheet


      I am trying excel objects to different sheets within the same excel.


      I tried the below code and getting the error. Any suggestions please.


      Dim aryExport(0,3)

      aryExport(0,0) = "CH25"

      aryExport(0,1) = "Sales"

      aryExport(0,2) = "A1"

      aryExport(0,3) = "data"

       

      Dim objExcelWorkbook 'as Excel.Workbook

      Set objExcelWorkbook = CopyObjectsToExcelSheet(ActiveDocument, aryExport)