Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Filter show all in VBA

Mia, you dont need to specify the criteria for All. Try and feedback

If c11 = "Alla" Then
ActiveSheet.ListObjects("Tabell102713").Range.Auto Filter Field:=11
End If

If this post helps click Yes
---------------
Jacob Skaria


"Mia" wrote:

Hi I using filtering in VBA programming and I have a problem when I want to
show all in a column. Do any one know the code and what I should write? I
have tryed with folliwing but it dosent work. All filtering works but not to
show all (alla means all).

Private Sub Worksheet_Change(ByVal Target As Range)
'
ActiveSheet.Unprotect

Dim Fakturerad As String
Fakturerad = ActiveSheet.Range("C11")

ActiveSheet.ListObjects("Tabell102713").Range.Auto Filter


ActiveSheet.ListObjects("Tabell102713").Range.Auto Filter Field:=11,
Criteria1 _
:=Fakturerad

If c11 = "Alla" Then
ActiveSheet.ListObjects("Tabell102713").Range.Auto Filter Field:=11,
Criteria1 _
:="<"
End If
End Sub

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
show a filter of a range AJB Excel Discussion (Misc queries) 4 February 11th 09 12:32 PM
The filter didn't show all (2,254) names when I set it up Darrell Excel Discussion (Misc queries) 2 December 17th 05 04:25 PM
FILTER: show/don't show selection with tickboxes ancharwashere Excel Discussion (Misc queries) 2 October 11th 05 09:20 PM
show filter criteria slechols Excel Programming 3 August 26th 05 12:46 AM
How do I show the results of filter? [email protected].(donotspam) Excel Discussion (Misc queries) 1 August 2nd 05 09:47 PM


All times are GMT +1. The time now is 03:19 AM.

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"