Results 1 to 4 of 4

Thread: [RESOLVED] advancedfilter - arrows being removed

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2012
    Posts
    90

    [RESOLVED] advancedfilter - arrows being removed

    Hi

    I have a table range called 'picklist' and I want to do an advanced filter. All that works fine but when the code hits the .advancedfilter line then the filter arrows are removed. I could put this back but this is the only place in the entire program that this happens - other advancedfilters work fine.

    Any clue why this happens and how to stop it happening?

    Code:
    Private Sub cmdExport_Click()
    
    Dim wbSaveAs As String
    Dim wbSaveName As String
    Dim newWorkBook As Workbook
    Dim rng As Range
    Dim oSh As Worksheet
    Set oSh = worksheets("sheet1")
    
    wbSaveName = worksheets("sheet4").Range("F4").Value
    wbSaveAs = worksheets("sheet4").Range("F3").Value & wbSaveName
    
    worksheets("sheet1").Unprotect
    
    Set rng = worksheets("sheet1").ListObjects("PickList").AutoFilter.Range
    
         With worksheets("sheet1").Range("Picklist[#All]")
                          
            Call FreezeScreen
               
    Action:=xlFilterInPlace, CriteriaRange:=worksheets("sheet4").Range("H1:J3"), Unique:=False
            oSh.ListObjects("PickList").Range.advancedfilter Action:=xlFilterInPlace, CriteriaRange:=worksheets("sheet4").Range("H1:J3"), Unique:=False
    I'm calling 'freezescreen' and this is the code;
    Code:
    Sub FreezeScreen()
    
        With Application
    '        xlCalc = .Calculation
    '        .Calculation = xlCalculationManual
    '        .EnableEvents = False
            .ScreenUpdating = False
            .DisplayAlerts = False
        End With
    
    End Sub
    Last edited by scoobster; Jul 6th, 2012 at 07:28 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width