Excel 2003: Grayed Out Data Menu

Solved
Hello,

I have a file that doesn't allow me to access the Data menu commands because everything is grayed out => it's impossible to delete the filter, sort, etc....

Originally, my problem is to retrieve all the rows when I no longer want to filter based on the criteria, I did it in VBA but I'm too much of a beginner to figure it out...

The goal was to sort based on x criteria placed in A1:T2, my data located just below.
It works when I put something in the cells B2 to T2 but as soon as I remove everything from B2:T2 to see all of my data, it crashes and runs in circles until I interrupt it with CTRL+Break...

Here is the code that I run every time I make a change on the sheet
a = ActiveCell.Row
b = ActiveCell.Column
num_line = Cells(4, 1) + 40

zone = Cells(2, 21)
If zone <> "" Then
Range(Cells(8, 1), Cells(num_line, 20)).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Range("A1:T2"), Unique:=False

Else
ActiveSheet.ShowAllData

end if

Sorry, this makes two questions but they might be related.

Thank you in advance for your help

Sorry, I can't send you the file

Configuration: Windows XP / Internet Explorer 6.0

1 answer

  1. There must be a protection?

    Tool ==> Protection ==> Remove the protection
    1. Hello

      if there is one, I can't find it because this version of Excel is new to me; in the review tab, I don't see anything that indicates it's protected...
    2. I'm not using Excel 2007/2010, but either it's a protection or you might be in read-only mode.
    3. Merci, mais je ne suis pas en lecture seule et aucune protection n'a été trouvée. Pourrais-tu le faire revenir en VBA ou me donner une réponse pour afficher toutes les lignes d'un tri avancé en VBA ?
      Merci
    4. Contributor
      Hello
      to check:
      right-click on the tab name in the display at the bottom and:
      remove protection.
      regards
    5. Hello Lentz

      Thank you for suggesting that I check the tab; it made me realize I had multiple tabs selected at the same time... I'm embarrassed.... thank you both for this grayed-out menu issue

      I will open another post for my macro problem..