Re: $$Excel-Macros$$ SUBTOTAL REMOVE

2012-02-06 Thread Maries
Hi, ** *Try this code:* ** Sub Macro1() Cells.Select Selection.RemoveSubtotal End Sub Regards, MARIES. On Mon, Feb 6, 2012 at 11:37 AM, chandra sekaran duraichan...@gmail.comwrote: HI ALL I have write small macro , i want revmove subtotal if Active sheet subtotal method is

Re: $$Excel-Macros$$ SUBTOTAL REMOVE

2012-02-06 Thread Sam Mathai Chacko
To keep it shorter, and more efficient, one could write Sub ClearSubTotal() ActiveSheet.UsedRange.RemoveSubtotal End Sub Regards, Sam Mathai Chacko On Mon, Feb 6, 2012 at 2:16 PM, Maries talk2mar...@gmail.com wrote: Hi, ** *Try this code:* ** Sub Macro1() Cells.Select

Re: $$Excel-Macros$$ SUBTOTAL REMOVE

2012-02-06 Thread chandra sekaran
Hi sam, If Subtotal method is there than only remove subtotal works , in that case whether subtotal paticular sheet is there or not if subototal method is there i will use below code will work.if not thereby pass remove subtotal then subtotal commant will work this my query

Re: $$Excel-Macros$$ SUBTOTAL REMOVE

2012-02-06 Thread Sam Mathai Chacko
There is no object model in Excel which tests the use of subtotal in a worksheet/range. The closest you could get is to look whether the used range has something like an =SUBTOTAL(*) somewhere, and then use the code that I suggested below. But that would then not be fool proof. The possibility

Re: $$Excel-Macros$$ SUBTOTAL REMOVE

2012-02-06 Thread chandra sekaran
Dear sam, Thanks for your valuable Advice Regards chandru On Tue, Feb 7, 2012 at 12:22 AM, Sam Mathai Chacko samde...@gmail.comwrote: There is no object model in Excel which tests the use of subtotal in a worksheet/range. The closest you could get is to look whether the used range has

$$Excel-Macros$$ SUBTOTAL REMOVE

2012-02-05 Thread chandra sekaran
HI ALL I have write small macro , i want revmove subtotal if Active sheet subtotal method is there Sub Macro1() If ActiveSheet.SubtotalMethod = True Then Selection.RemoveSubtotal End If End Sub can any one correct this code Regards chandru chennai -- FORUM RULES (986+