Table properties/Table total Row problem

J

John

I would like the Worksheet_Change event to do one sub procedure if an
Excel 2007 table is filtered, and I would like it to do another subroutine
if it is not filtered. Is there a table property or some way of
determining this? Specifically, I'm trying to programmatically change my
Table Total Row formulas based on on whether my Table is filtered or not.
 
S

SeanC UK

Hi John,

There is a property you can check:

If shtMySheet.FilterMode = True Then
'DO THIS
Else
'DO THIS INSTEAD
End If

However, I was trying to do the exact same thing and I found that if the
selected cell was outside of the table range then sometimes it would show as
False when the table was in fact filtered (even after activating the sheet).
I simply added a line that selected a cell in the title row first, then no
problems!

shtMySheet.Cells(tblDataTable.HeaderRowRange.Row, _
tblDataTable.HeaderRowRange.Column).Select

Hope this helps,

Sean.
 
Top