vba - Loop through worksheets and format chart 1: run time error -


i wrote chart formatting macro, works when applied specific sheet, , i'm trying use in each loop. macro supposed loop through list of sheets , format chart 1. i'm getting "run time error 438: object doesn't support property or method" @ line:

.activechart.shapes("textbox 1").textframe.characters.text = "bodily injury (bi) liability claim trends" & vblf & " 2005-" & range("k5").value & " percentage change" 

here each loop:

sub updatetextallstatecharts() 'this macro loops through worksheets in list , performs assigned task dim sheet_name range each sheet_name in sheets("ws").range("c:c")     if sheet_name.value = ""         exit     else         sheets(sheet_name.value)             .chartobjects("chart 1").activate             .activechart.shapes("textbox 1").textframe.characters.text = "bodily injury (bi) liability claim trends" & vblf & " 2005-" & range("k5").value & " percentage change"             .chartobjects("chart 1").activate            activechart.shapes("textbox 1").textframe.characters            .font            .name = "calibri"            .size = 14            .fontstyle = "regular"            end            activechart.shapes("textbox 1").textframe            .characters(42, 68).font           .fontstyle = "italic"           .size = 12           end           end           end         end     end if     next sheet_name end sub 

this line causing same error:

with .characters(42, 68).font 

thanks in advance help.

regards,


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -