vba - 1004 Runtime Error on adding Excel chart -


consider code:

subroutine(byref objexcelapp object)  dim objchart excel.chart<br> dim objchartadd excel.chart   set objchart = charts.add  'plotting graph in excel   'after completion  set objchart = nothing  end sub 

when run code, runs fine, , without closing application if rerun report type - prompts error 1004 @ set objchart = charts.add

any help, can provide appreciated.

can add chart in ui? bet you're in situation chart cannot added (multiple sheets selected; workbook not activated; protected range active; etc).

chris


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -