![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 62
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
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 |
|
Board Regular
Join Date: Mar 2002
Posts: 62
|
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(8), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|