Hi,
I'm trying to delete rows based on a filter criteria, but I keep getting run-time error '1004' on the highlighted line. Here is what I have, can anyone help?
Please Login or Register to view this content.
Hi,
I'm trying to delete rows based on a filter criteria, but I keep getting run-time error '1004' on the highlighted line. Here is what I have, can anyone help?
Please Login or Register to view this content.
Why the offset? That could be slipping in rows that are hidden.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
hi all,
JB, The use of "specialcells" prevents hidden rows being included. I suspect the offset is to ignore the header row.
acs013, You have error checking early in your code but it appears you have none to identify if there are actually visible cells once the filter is applied & this may be your problem. Here is an unmodified function from my work which you may be able to adapt & include in your macro:
hthPlease Login or Register to view this content.
Rob
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks