Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello I was experimenting with changing graph data in VBA and could do with
some help. Easy enough to do by selecting the graph in question as in fist example below. Is there a way of doing it with the With command (which i gather is much more processor efficient - an important factor in this scenario). My attempts below, the first way works fine but the second way I'm struggling on syntax Any advice gratefully received tp Sub changegraph() ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.PlotArea.Select ActiveChart.SeriesCollection(2).Values = "=WMP!$BH$4:$BH$304" End Sub Sub changegraph2() With Sheets("sheet1").ChartObjects("Chart 1") .PlotArea.Select '(I tried omitting this line but no good) .SeriesCollection(2).Values = "=WMP!$BH$4:$BH$304" End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Checking to see that a CHART exists prior to running a simple command | Excel Discussion (Misc queries) | |||
Simple Question | Excel Discussion (Misc queries) | |||
search string command to answer simple Yes or No | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) |