View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kmbarz kmbarz is offline
external usenet poster
 
Posts: 16
Default Broken macro in Excel 2003: part II

I posted on this once before and got some advice that I've followed up on
(thanks!) I sp1 installed and tried the registry edit mentioned in article
831824, but no luck there so I've set it back to its original setting. I
think I've come up with some of the offending code that ran well in Excel
2000 but breaks in Excel 2003. As of the first line of this code, all of the
applicable data is selected, but by the time it gets to the end there are
many rows that fall below the bottom of the selection.

' Subtotal by company name
Range("A5", Range("A5").End(xlDown).End(xlToRight)).Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True
Range("A5", Range("A5").End(xlToRight).End(xlDown)).Select
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True

Any ideas that you can provide will be greatly appreciated.