VBA Subtotal without activating worksheet RRS feed

  • Question

  • I need to be able to subtotal a filtered table without activating the worksheet, is this possible?

    The code I'm using works fine as long as the sheet is activated.

    Monday, August 28, 2017 10:17 AM

All replies

  • KG,
    re:  is it possible

    Use the worksheet name instead of "ActiveSheet" ...  Worksheets("Sludge")
    Do not select anything.

    Jim Cone
    Portland, Oregon USA (Dropbox)
    (free & commercial excel add-ins & workbooks)

    Monday, August 28, 2017 6:56 PM
  • You need to fully qualify the range.

    You probably have code like:


    You need to change that to:


    and then it will work fine...

    If you have problems modifying your code, post back with your actual code and the name of the worksheet.... 

    Monday, August 28, 2017 6:58 PM