Hi all,

I am trying to alter the source range for an excel graph from my VB programm. This works fine when I run the macro in Excel. However, when I try to do the same from VB it does not work.
Anybody an idea ?

Thanks
Karsten
_________________________________________
Dim wb As Workbook

With wb
.Sheets("Diagramm1").Activate
.Sheets("Diagramm1").Select
.ActiveChart.PlotArea.Select
.ActiveChart.SetSourceData Source:=Sheets("Tabelle1").Range(.Cells(1, 1), .Cells(5, 2)), PlotBy _
:=xlColumns
end with