i've got old vba-script (office 2003) fix fails in office 2010. problem seems caused syntax used reference sheets , cells.
activechart.seriescollection(1).xvalues = _ "=ep!z1s2:z1s" & mid(str(schritte + 2), 2) activechart.seriescollection(1) .values = "=ep!z3s2:z3s" & mid(str(schritte + 2), 2) .name = "=ep!z3s1" end is there alternative using "=sheet!cellrange"? or can problem solved changing configuration in office / excel?
you need provide cell ranges coded range objects and/or range.cells property, possibly range.resize property.
dim ws worksheet set ws = worksheets("ep") activechart.seriescollection(1).xvalues = _ ws.range("z1s2:z1s" & mid(str(schritte + 2), 2)) activechart.seriescollection(1) .values = ws.cells(3, 2).resize(1, int(mid(str(schritte + 2), 2))) '=ep!z3s2:z3s" & mid(str(schritte + 2), 2) .name = ws.cells(3, 1) '=ep!z3s1 end when created chart using strictly strings describing ranges, received compile error: type mismatch. wrapped strings in range or referenced them more directly .cells problem disappeared , chart generated.
Comments
Post a Comment