vba - Update y-axis max values from other cells working for some charts but not all on sheet -


i trying update max values on axis based on other cells. code works charts 1-14 fails charts 15 & 16. far can see code same , charts same.

here code:

with activesheet.chartobjects("chart 1").chart  ' value (y) axis .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af34").value  .minimumscale = activesheet.range("ag34").value  end   end    activesheet.chartobjects("chart 9").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af34").value  .minimumscale = activesheet.range("ag34").value  end   end    activesheet.chartobjects("chart 2").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af35").value  .minimumscale = activesheet.range("ag35").value  end   end    activesheet.chartobjects("chart 10").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af35").value  .minimumscale = activesheet.range("ag35").value  end  end    activesheet.chartobjects("chart 3").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af36").value  .minimumscale = activesheet.range("ag36").value  end   end    activesheet.chartobjects("chart 11").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af36").value  .minimumscale = activesheet.range("ag36").value  end   end    activesheet.chartobjects("chart 4").chart   ' value (y) axis .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af37").value  .minimumscale = activesheet.range("ag37").value  end   end    activesheet.chartobjects("chart 12").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af37").value  .minimumscale = activesheet.range("ag37").value  end   end    activesheet.chartobjects("chart 5").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af38").value  .minimumscale = activesheet.range("ag38").value  end   end    activesheet.chartobjects("chart 13").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af38").value  .minimumscale = activesheet.range("ag38").value  end   end    activesheet.chartobjects("chart 6").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af39").value  .minimumscale = activesheet.range("ag39").value  end   end    activesheet.chartobjects("chart 14").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af39").value  .minimumscale = activesheet.range("ag39").value  end   end    activesheet.chartobjects("chart 7").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af40").value  .minimumscale = activesheet.range("ag40").value  end   end     activesheet.chartobjects("chart 15").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af40").value  .minimumscale = activesheet.range("ag40").value  end   end     activesheet.chartobjects("chart 8").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af41").value  .minimumscale = activesheet.range("ag41").value  end   end     activesheet.chartobjects("chart 16").chart   ' value (y) axis  .axes(xlvalue, xlprimary)  .maximumscale = activesheet.range("af41").value  .minimumscale = activesheet.range("ag41").value  end   end 

any appreciated!


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -