excel - Error bar visibility -


i have excel template produce multiple charts - on 20 charts arranged on different sheets.

i assign macro button or 2 buttons add/ remove error these bars manipulating transparancy of line ...

i helped out following code work when each sheet clicked on:

sub macro2()  dim objcht chartobject dim ws worksheet  ' loop through sheets in workbook each ws in thisworkbook.worksheets ' loop through chartobjects in sheet each objcht in activesheet.chartobjects     ' no need select chart or series use statement instead     objcht.chart.seriescollection(1)        .haserrorbars = true         .errorbars.format.line             .visible = msotrue             .forecolor.objectthemecolor = msothemecolortext1             .forecolor.tintandshade = -0.0500000119             .forecolor.brightness = 0             .transparency = 1         end       end    next objcht next ws  end sub 

the following saved on each worksheet:

private sub worksheet_activate() macro2 end sub 

try changing line for each objcht in activesheet.chartobjects for each objcht in ws.chartobjects. loop multiple times through sheets without using them. in second approach, every loop change sheet.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -