Erdin? E. Ka
11-20-2006, 09:44 AM
Hi everyone:hi:
One of our member on T?rkiye Board asked a question about how to automatic set a data source of a chart?
I tried some methods to solve it but i couldn't. :dunno
Can somebody help me please?
I attached the file.
And the wrong codes:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim LastRow
Set Sheet = Sheets("Sheet1")
LastRow = WorksheetFunction.CountA(Sheet.Range("A:A"))
ActiveChart.SetSourceData Source:=Sheet.Range("A1:B" & LastRow), PlotBy:=xlColumns
End Sub
(Actually i want to learn VBA VBA method a and via Formula method to solve it, if it possible. )
Thanks in adnavce.
One of our member on T?rkiye Board asked a question about how to automatic set a data source of a chart?
I tried some methods to solve it but i couldn't. :dunno
Can somebody help me please?
I attached the file.
And the wrong codes:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim LastRow
Set Sheet = Sheets("Sheet1")
LastRow = WorksheetFunction.CountA(Sheet.Range("A:A"))
ActiveChart.SetSourceData Source:=Sheet.Range("A1:B" & LastRow), PlotBy:=xlColumns
End Sub
(Actually i want to learn VBA VBA method a and via Formula method to solve it, if it possible. )
Thanks in adnavce.