Is Auto Filter On

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Thanks in advance.

Need help on the following:-

1) is auto filter on if so turn it off

I will be doing other code in here between 1 & 2



2) if last active row is less than row 4 don't turn auto filter on. All
others turn auto filter on


Thanks

Trev
 
Hi Trev,

Try using the AutoFilterMode property.

For example, try:

'=============>>
Public Sub Tester()

Dim SH As Worksheet

Set SH = ActiveSheet '<<=== CHANGE

With SH
If .AutoFilterMode Then
.AutoFilter.Range.AutoFilter
End If
End With
End Sub
'<<=============
 
Or just turn it off

activesheet.autofiltermode = false

It won't hurt if it's already off.
 
Thanks Dave,

Worked a treat.

Plus I have solved part 2

Thanks once again

Trev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top