vba - Dynamically change charts in excel -
i have following problem. have relative large number of excel charts, , want able change size of charts (i.e. width , height) automatically. automatically mean following: have 2 cells, 1 height , 1 width, , when change them, charts change automatically, without having push other button or anything. example, cell a1 has value 100 width , cell b1 has value 200 height. so, when change a1 200 , b1 300 charts bigger.
what have done able loop on charts, , change shapes, need hit button first macro run. find out if there way change shape of charts without having push button, changing values of 2 cells have width , height of charts. in advance.
in vbaproject, open microsoft excel objects , select sheet have a1:b1 in. write
private sub worksheet_change(byval target range) if not intersect(target, target.worksheet.range("a1:b1")) nothing 'put macro here' end if end sub
this way, everytime changes in a1 or b1 macro run. careful of write in a1 or b1 tho, should put checks on values before run macro
Comments
Post a Comment