Excel 2003: Grayed Out Data Menu

Solved
ben -  
 KrOmA -
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

Lentz
 
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
0
ben
 
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
0
KrOmA
 
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
3