Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Subtotal Macro

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I've developed a macro which amongst other things runs the subtotal wizard, this has worked fine with the first few files i've used it with until now, where i get the message 'Run-time error '1004': subtotal method of range class failed.'
    Could anybody explain?

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Run the macro again, hit "Debug" and post the line of code that is highlighted in yellow. Until we see that line of code, the error could mean anything.

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(8), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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