View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Check for & remove Subtotal(s)

It wouldn't be definitive, but you could use
ActiveWindow.DisplayOutline

to see if the outline symbols are displayed.

If the data normally would not have formulas in it you could also check for
a subtotal formula using Find or use specialcells to find cells with
formulas.

--
Regards,
Tom Ogilvy


"josnah" wrote:


Currently I'm using a msgbox to ask users to manually remove subtotals
before proceeding.

If MsgBox("Pls ensure that subtotals, if any, are removed before
proceeding", vbOKCancel) = vbCancel Then Exit Sub

How can I include in my macro to first check if there is a subtotal(s)
& to remove all?
Or maybe stop the macro if there are subtotals found in the worksheet?


Any help is greatly appreciated!


--
josnah
------------------------------------------------------------------------
josnah's Profile: http://www.excelforum.com/member.php...fo&userid=6334
View this thread: http://www.excelforum.com/showthread...hreadid=564663