xgary.wilsonx
New Member
- Joined
- Dec 17, 2009
- Messages
- 40
Hi
I am trying to create a macro that will change the scource data of my chart to resize the data range, however i want it to automatically resize according to either howmany columns of data there are present or have a popup that will request the number of columns to include as series.
any help greatly received
the code i have so far is:
Sub sourcetest()
'
' sourcetest Macro
' Macro recorded 18/12/2009 by WGS
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=Sheets("Auto").Range("A40:D69"), PlotBy:= _
xlColumns
ActiveWindow.Visible = False
Windows("graphs GW.xls").Activate
Range("B37").Select
End Sub
Many thanks
I am trying to create a macro that will change the scource data of my chart to resize the data range, however i want it to automatically resize according to either howmany columns of data there are present or have a popup that will request the number of columns to include as series.
any help greatly received
the code i have so far is:
Sub sourcetest()
'
' sourcetest Macro
' Macro recorded 18/12/2009 by WGS
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=Sheets("Auto").Range("A40:D69"), PlotBy:= _
xlColumns
ActiveWindow.Visible = False
Windows("graphs GW.xls").Activate
Range("B37").Select
End Sub
Many thanks