ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Troubles with ActiveSheet.ShowAllData (https://www.excelbanter.com/excel-programming/362934-troubles-activesheet-showalldata.html)

[email protected]

Troubles with ActiveSheet.ShowAllData
 
I have a VB piece of code that runs and needs to unfilter the worksheet
data as part of it. Based on postings out here, I've seen that I
should use this bit of code:

On Error Resume Next
ActiveSheet.ShowAllData
On Error GoTo 0

The problem is that it doesn't seem to work for my worksheet, when
going through this piece of code, it appears to still leave the
filtered values on. It's o.k. to leave the drop down arrows, just need
all of the data displayed in the Active worksheet.

Any help would be greatly appreciated.

Thanks!


Dave Peterson

Troubles with ActiveSheet.ShowAllData
 
Is the activesheet protected?

And take a look at the row numbers in the autofilter range. Are they still
blue? If yes, then that line of code didn't work.

(I'd drop the "on error resume next" and see if there's an error message that
pops up.)

wrote:

I have a VB piece of code that runs and needs to unfilter the worksheet
data as part of it. Based on postings out here, I've seen that I
should use this bit of code:

On Error Resume Next
ActiveSheet.ShowAllData
On Error GoTo 0

The problem is that it doesn't seem to work for my worksheet, when
going through this piece of code, it appears to still leave the
filtered values on. It's o.k. to leave the drop down arrows, just need
all of the data displayed in the Active worksheet.

Any help would be greatly appreciated.

Thanks!


--

Dave Peterson

Jeff Standen[_2_]

Troubles with ActiveSheet.ShowAllData
 
I would just do something like

activesheet.cells.autofilter

If it's filtered it will clear all the filters. If it has the dropdowns but
isn't filtered it will remove them. If it has no drop downs it will put them
on. In any case you will have an unfiltered list.

Jeff

wrote in message
oups.com...
I have a VB piece of code that runs and needs to unfilter the worksheet
data as part of it. Based on postings out here, I've seen that I
should use this bit of code:

On Error Resume Next
ActiveSheet.ShowAllData
On Error GoTo 0

The problem is that it doesn't seem to work for my worksheet, when
going through this piece of code, it appears to still leave the
filtered values on. It's o.k. to leave the drop down arrows, just need
all of the data displayed in the Active worksheet.

Any help would be greatly appreciated.

Thanks!




[email protected]

Troubles with ActiveSheet.ShowAllData
 
Yes, it's password protected. I tried the activesheet.cells.autofilter
with unprotecting and that appears to work.

I'll play with it some more too...Thanks for the help!
Jeff Standen wrote:
I would just do something like

activesheet.cells.autofilter

If it's filtered it will clear all the filters. If it has the dropdowns but
isn't filtered it will remove them. If it has no drop downs it will put them
on. In any case you will have an unfiltered list.

Jeff

wrote in message
oups.com...
I have a VB piece of code that runs and needs to unfilter the worksheet
data as part of it. Based on postings out here, I've seen that I
should use this bit of code:

On Error Resume Next
ActiveSheet.ShowAllData
On Error GoTo 0

The problem is that it doesn't seem to work for my worksheet, when
going through this piece of code, it appears to still leave the
filtered values on. It's o.k. to leave the drop down arrows, just need
all of the data displayed in the Active worksheet.

Any help would be greatly appreciated.

Thanks!




All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com