I created a loop that does run correctly, except that anything that comes after does not run. Am I missing an exit point?
![]()
Please Login or Register to view this content.
I created a loop that does run correctly, except that anything that comes after does not run. Am I missing an exit point?
![]()
Please Login or Register to view this content.
I do not do Pivot Tables however
As I see it you are looking at entries in the "Status" Field of a Pivot Table.
So would an entry have a name?
![]()
Please Login or Register to view this content.
My General Rules if you want my help. Not aimed at any person in particular:
1. Please Make Requests not demands, none of us get paid here.
2. Check back on your post regularly. I will not return to a post after 4 days.
If it is not important to you then it definitely is not important to me.
I only want to see the blank items in this particular list. The code does actually work for that function. Just doesn't want to go past the loop itself. Thank you.
If I understand correctly, the code you posted is a working part of larger code, and your problem is with code below that loop? We'd have to see more of the code, and if possible a sample workbook.
Please help by:
Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know
There are 10 kinds of people in this world... those who understand binary, and those who don't.
I just realized you changed from my original. Thanks for that, and I do prefer an If Then statement. I'm not as familiar with the Select Case.
That being said, I tried it and it does the same thing. For some reason it doesn't want to move on from there...
My debugging strategy would be to add a Stop statement immediately after the loop, then step through from there to see what the subsequent code is doing. Copied from the OP:![]()
Please Login or Register to view this content.
Originally Posted by shg
Forgive me. I always have a reluctance to attach a sample because, like you said, it is part of a larger system of code. In this case, there is quite a lot, but I am able to manage breaking it down for just this issue. Please find it attached.
Since I did take it out of the larger code for this sample (this sub is called to another), when the loop runs through to the last item, which I don't know what it would be, shows that it is unable to get the PivotItems property of the PivotField class.
Last edited by jmklei0; 10-19-2020 at 03:41 PM.
Fixed it!
"" is not the same as (blank).
Just changed the case to (blank). Simple enough. Now, I can experiment with maybe doing it without a loop or simplifying it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks