Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hell and thank yoy for your help!
It dosen´t work. Instead of showing all its showing nothing. BR Mia "Jacob Skaria" skrev: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It should be Hello and thank you, not hell!!!!
I'm so sorry!!!!! I am very grateful for all help! Mia "Mia" skrev: Hell and thank yoy for your help! It dosen´t work. Instead of showing all its showing nothing. BR Mia "Jacob Skaria" skrev: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello again,
You were totaly right! I changed C11 to Fakturerad and now i works! Thank you for your help! BR Mia 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 Fakturerad = "Alla" Then ActiveSheet.ListObjects("Tabell102713").Range.Auto Filter Field:=11 End If End Sub -- Best regards Mia "Jacob Skaria" skrev: 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter show all in VBA | Excel Programming | |||
show a filter of a range | Excel Discussion (Misc queries) | |||
Filter - Show All button | Excel Discussion (Misc queries) | |||
FILTER: show/don't show selection with tickboxes | Excel Discussion (Misc queries) | |||
How do I show the results of filter? | Excel Discussion (Misc queries) |