Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
for set object corresponds to xl. using this code with replace of your excel code
Set objXL = CreateObject(“Excel.Application”)
hope it will helps you