LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default problem with Subtotals and ClearOutline method

I am using the following code to generate subtotals. The
code is

Sub Sub_Totals()

Dim arr() As Integer
Dim i As Integer
Dim colArray As Variant

Sheets("data").Range("DatArea").Select

FirstCol = 8
LastCol = Range("IV1").End(xlToLeft).Column
ReDim arr(FirstCol To LastCol)
For i = FirstCol To LastCol
arr(i) = i
Next
colArray = arr()
Selection.Subtotal groupby:=4, Function:=xlSum,
totallist:=colArray, _
Replace:=True
Selection.Subtotal groupby:=6, Function:=xlSum,
totallist:=colArray, _
Replace:=False

With Selection

.ClearOutline

End With


After VBA has created the subtotals, the Grand Totals are
outside of my "datarea" range so that when I use selection
to activate the clearOutline method it doesn't work
properly (the expand/contract lines are removed but the
showlevel buttons remain). In effect I'm only selecting a
subset of my data albeit everything apart from 3 lines out
of 2000. Can anyone help me resolve this?
PS, does anyone know the syntax to format the subtotals so
that they appear in a bold font as well.
PPS, any feedback on the code I'm using is welcome 'cause
it's taking about 1 to 2 minutes to process 100 columns by
about 1500 rows.
Many thanks
Jacqui


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using SaveAs method Sujata Excel Discussion (Misc queries) 4 March 30th 10 07:21 AM
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) AndyCotgreave Excel Discussion (Misc queries) 3 October 24th 07 11:32 AM
Problem with nested subtotals, placing secondary subtotals BELOW . Dawn Cameron Excel Discussion (Misc queries) 1 June 3rd 05 10:13 PM
ClearOutLine Method jacqui[_2_] Excel Programming 1 January 21st 04 03:14 AM


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"