1 Reply Latest reply: Dec 19, 2012 2:08 AM by Mohit Sharma RSS

    error in macro

    sriram s

      Hi ,

       

      I am using the below macro for export to excel using button .I am getting the error in below code

       

       

      Set

       

      objExcelWorkbook = copyObjectsToExcelSheet(ActiveDocument, aryExport)

       

       

      The full macro code is

       

       

       

      sub exportToExcel_Variant1


      Dim aryExport(0,3)


      aryExport(0,0) = "Supply Plan Waterfall"    
      'aryExport(0,1) = "Sales per Region a. Year"
      aryExport(0,2) = "A1"
      aryExport(0,3) = "data"

      Dim objExcelWorkbook 'as Excel.Workbook
      Set objExcelWorkbook = copyObjectsToExcelSheet(ActiveDocument, aryExport)

      end sub

       

      Can anyone please help me how to resolve the above error?