View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bilbotubbins[_2_] Bilbotubbins[_2_] is offline
external usenet poster
 
Posts: 1
Default Need Help with marco and autofilter


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/08/2005 by Tubby
'

'
Sheets("Sheet1").Select
Selection.AutoFilter Field:=1, Criteria1:="Plumber"
Range("B21,B2:B3,D2:D3").Select
Range("D2").Activate
Charts.Add
ActiveChart.ChartType = xlPie
ActiveChart.SetSourceDat
Source:=Sheets("Sheet1").Range("B21,B2:B3,D2:D3")
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"

End Sub
Sub testplu()
'
' testplu Macro
' Macro recorded 4/08/2005 by Tubby
'

'
Sheets("Sheet1").Select
ActiveWindow.SmallScroll Down:=27
Selection.AutoFilter Field:=1, Criteria1:="Plumber"
Range("B41:B42,D41:D42").Select
Range("D41").Activate
Charts.Add
ActiveChart.ChartType = xlPie
ActiveChart.SetSourceDat
Source:=Sheets("Sheet1").Range("B41:B42,D41:D42")
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"
ActiveSheet.Shapes("Chart 25").IncrementLeft -165#
ActiveSheet.Shapes("Chart 25").IncrementTop -399.75
Windows("Rental Maintenance.xls").SmallScroll Down:=21
ActiveWindow.Visible = False
Windows("Rental Maintenance.xls").Activate
Selection.AutoFilter Field:=1
End Su

--
Bilbotubbin
-----------------------------------------------------------------------
Bilbotubbins's Profile: http://www.excelforum.com/member.php...fo&userid=2591
View this thread: http://www.excelforum.com/showthread.php?threadid=39286