Troubles with ActiveSheet.ShowAllData

  • Thread starter Thread starter bradjensmith
  • Start date Start date
B

bradjensmith

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!
 
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.)
 
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
 
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top