Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default Subtotal method of Range class failed

Hello:

In a simple macro that I created, I have the following:

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

Although this macro ran fine for days without error, all of a sudden, it is
giving me the "Subtotal method of Range class failed" error when I run it
today. (Must be a Monday...)

How do I fix this? It's Office 2007. Also, how do I save the fix? Every
time I try to make changes to the VBA Editor and save, it seems like it wants
to save a new doc. All I want to do is make the change (the fix), save the
change in the same macro file, and be done.

childofthe1980s
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Subtotal method of Range class failed

I susspect you selection changes each day which is cuaing the problem. check
the range that is being selected. Then validatate this is the problem by
trying the same subtotal by going to the worksheet and using Data - Subtotals.

To validate the selection you can add a break ppoint on the line you have
posted by clicking with the mouse on the line and then Pressing F9. the line
should change color. Then execute the macro like you would normally do. the
code will stop executing on the highlighted line. then go to the worksheet
and see which area is highlighted. Also check that the Selection contains 12
items.

"childofthe1980s" wrote:

Hello:

In a simple macro that I created, I have the following:

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

Although this macro ran fine for days without error, all of a sudden, it is
giving me the "Subtotal method of Range class failed" error when I run it
today. (Must be a Monday...)

How do I fix this? It's Office 2007. Also, how do I save the fix? Every
time I try to make changes to the VBA Editor and save, it seems like it wants
to save a new doc. All I want to do is make the change (the fix), save the
change in the same macro file, and be done.

childofthe1980s

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Method of Range Class Failed DKS Excel Programming 3 January 31st 08 12:11 AM
autofill method of range class failed phil2006[_16_] Excel Programming 2 June 28th 06 12:08 PM
Select method of range class failed sa02000[_4_] Excel Programming 1 October 5th 05 01:20 PM
Autofill method of Range class failed JJ \(UK\)[_2_] Excel Programming 2 August 14th 05 07:46 PM
select method of range class failed Joseph[_40_] Excel Programming 0 September 28th 04 04:08 PM


All times are GMT +1. The time now is 01:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"