Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Hide all autofilter dropdown arrows

I have a macro that sets an autofilter range with criteria set for column A.
I can hide the drop down arrow in A with:

Worksheets("Jobs").Range("A3:P3")
.AutoFilter _
field:=1, _
Criteria1:="Y", _
visibledropdown:=False

Is there a way to hide all dropdown arrows in the range?

Hope you can help.

Jim
--
Jim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Hide all autofilter dropdown arrows

I don't think so, but why don't you apply Autofilter only to range("A3:A?")?
Regards,
Stefi

€˛Jim G€¯ ezt Ć*rta:

I have a macro that sets an autofilter range with criteria set for column A.
I can hide the drop down arrow in A with:

Worksheets("Jobs").Range("A3:P3")
.AutoFilter _
field:=1, _
Criteria1:="Y", _
visibledropdown:=False

Is there a way to hide all dropdown arrows in the range?

Hope you can help.

Jim
--
Jim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Hide all autofilter dropdown arrows

Thanks Stefi,
After all these years of habitually selecting the first row of the data
block to autofilter, it never occured to me that I only needed the first
cell! Thank you very much for the insight.

For anyone interested here is the final result:

Sub FilterActive()
'
' Filter Macro to show only active jobs
'
Dim LastRow As Long

Application.ScreenUpdating = False

With Worksheets("Jobs")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
'
With ActiveSheet
If .AutoFilterMode Then
.Range("$A$3:$A" & LastRow).AutoFilter field:=1, Criteria1:="Y",
visibledropdown:=False
Else

Range("A3").Select
.Range("$A$3:$A" & LastRow).AutoFilter field:=1, Criteria1:="Y",
visibledropdown:=False
End If
End With

Range("A3").Select

RowFit 'macro to autofit rows to data height

Application.ScreenUpdating = True
End Sub

I dare say I don't even need the 'Lastrow' variable now.

--
Jim


"Stefi" wrote:

I don't think so, but why don't you apply Autofilter only to range("A3:A?")?
Regards,
Stefi

€˛Jim G€¯ ezt Ć*rta:

I have a macro that sets an autofilter range with criteria set for column A.
I can hide the drop down arrow in A with:

Worksheets("Jobs").Range("A3:P3")
.AutoFilter _
field:=1, _
Criteria1:="Y", _
visibledropdown:=False

Is there a way to hide all dropdown arrows in the range?

Hope you can help.

Jim
--
Jim

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Hide all autofilter dropdown arrows

You are welcome! Thanks for the feedback!
Stefi

€˛Jim G€¯ ezt Ć*rta:

Thanks Stefi,
After all these years of habitually selecting the first row of the data
block to autofilter, it never occured to me that I only needed the first
cell! Thank you very much for the insight.

For anyone interested here is the final result:

Sub FilterActive()
'
' Filter Macro to show only active jobs
'
Dim LastRow As Long

Application.ScreenUpdating = False

With Worksheets("Jobs")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
'
With ActiveSheet
If .AutoFilterMode Then
.Range("$A$3:$A" & LastRow).AutoFilter field:=1, Criteria1:="Y",
visibledropdown:=False
Else

Range("A3").Select
.Range("$A$3:$A" & LastRow).AutoFilter field:=1, Criteria1:="Y",
visibledropdown:=False
End If
End With

Range("A3").Select

RowFit 'macro to autofit rows to data height

Application.ScreenUpdating = True
End Sub

I dare say I don't even need the 'Lastrow' variable now.

--
Jim


"Stefi" wrote:

I don't think so, but why don't you apply Autofilter only to range("A3:A?")?
Regards,
Stefi

€˛Jim G€¯ ezt Ć*rta:

I have a macro that sets an autofilter range with criteria set for column A.
I can hide the drop down arrow in A with:

Worksheets("Jobs").Range("A3:P3")
.AutoFilter _
field:=1, _
Criteria1:="Y", _
visibledropdown:=False

Is there a way to hide all dropdown arrows in the range?

Hope you can help.

Jim
--
Jim

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hide all autofilter dropdown arrows

I'm not quite sure why you'd want that, but...
http://contextures.com/xlautofilter03.html#Hide
(from Debra Dalgleish's site)

This kind of thing would remove the arrows from the existing autofilter range:

Dim c As Range
For Each c In ActiveSheet.AutoFilter.Range.Rows(1).Cells
c.AutoFilter Field:=c.Column, Visibledropdown:=False
Next c



Jim G wrote:

I have a macro that sets an autofilter range with criteria set for column A.
I can hide the drop down arrow in A with:

Worksheets("Jobs").Range("A3:P3")
.AutoFilter _
field:=1, _
Criteria1:="Y", _
visibledropdown:=False

Is there a way to hide all dropdown arrows in the range?

Hope you can help.

Jim
--
Jim


--

Dave Peterson
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
Turn of Autofilter Arrows? CLR Excel Programming 20 January 28th 08 11:55 PM
showing dropdown selection arrows in spread sheets rongripon Excel Discussion (Misc queries) 2 June 12th 07 04:48 PM
Removing dropdown arrows from a filter Pasty Excel Programming 2 April 3rd 07 12:28 PM
red autofilter arrows instead of blue in Excel? Trader D Excel Discussion (Misc queries) 1 August 28th 06 04:36 AM
Invisible AutoFilter Drop-Down Arrows Brian Arnold Excel Programming 3 July 30th 04 07:51 PM


All times are GMT +1. The time now is 12:52 PM.

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

About Us

"It's about Microsoft Excel"