+ Reply to Thread
Results 1 to 2 of 2

Check for & remove Subtotal(s)

  1. #1
    Registered User
    Join Date
    02-19-2004
    Posts
    57

    Question Check for & remove Subtotal(s)

    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!

  2. #2
    Tom Ogilvy
    Guest

    RE: 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
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1