anusha
10-07-2005, 03:45 PM
I need help with two radio buttons...
The first one does a filter
The second a graph
What do I do to turn off filter and close the graph window?
Private Sub filter_Click()
Call percent
End Sub
Private Sub graphs_Click()
Call graph
End Sub
Here's the code...
Sub percent()
' percent Macro
' Macro recorded 10/7/2005 by M1AFD00
Range("A11:H2500").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:=">=100%", Operator:=xlOr, Criteria2:="<=-100%"
End Sub
Sub graph()
' graph Macro
' Macro recorded 10/7/2005 by M1AFD00
Range("G11").Select
Range(Selection, Selection.End(xlDown)).Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("ANALYSIS").Range("G11:G119"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = "=ANALYSIS!R11C9:R119C9"
ActiveChart.Location Where:=xlLocationAsObject, Name:="ANALYSIS"
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
End Sub
The first one does a filter
The second a graph
What do I do to turn off filter and close the graph window?
Private Sub filter_Click()
Call percent
End Sub
Private Sub graphs_Click()
Call graph
End Sub
Here's the code...
Sub percent()
' percent Macro
' Macro recorded 10/7/2005 by M1AFD00
Range("A11:H2500").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:=">=100%", Operator:=xlOr, Criteria2:="<=-100%"
End Sub
Sub graph()
' graph Macro
' Macro recorded 10/7/2005 by M1AFD00
Range("G11").Select
Range(Selection, Selection.End(xlDown)).Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("ANALYSIS").Range("G11:G119"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = "=ANALYSIS!R11C9:R119C9"
ActiveChart.Location Where:=xlLocationAsObject, Name:="ANALYSIS"
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
End Sub