![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by Wijnand1; 10-18-2016 at 03:02 AM.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(I have added them for you - this time)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
oke, many thanks! will do with my next post.
Is the code not working?
When/where are you filtering?
If posting code please use code tags, see here.
i have a button in the userform that will autofilter the excel sheet. When i use the above code to search the excel sheet and display the results in the listbox, only the visible cells need to be displayed in the listbox, not the cells that a hide by the autofilter.
Hope someone can help? if more information is needed...
Why are you filtering and checking column B for the value in txtSearch?
That's what's confusing me.
The above code is to search the value in "txtSearch.Value" when value in "cboSelect.Value" is Service number and show the results in the listbox. This is working. But when i aply the autofilter in excel it only needs to search and show the visible cells in the listbox and not the cells that are hide by the autofilter.
Last edited by Wijnand1; 10-19-2016 at 02:53 AM.
With this loop,
you will be looping through all cells.![]()
Please Login or Register to view this content.
You need to change the loop to only loop through visible cells.
That can be done with something like this, which loops through the visible cells in column B.
That's pretty rough, and untested, but hopefully you get the idea.![]()
Please Login or Register to view this content.
Thanks for the information. I get the idea but do not get it to work.
How does it not work?
Any chance you could upload a sample workbook?
Click on GO ADVANCED, scroll down and click Manage Attachments.
Got it to work, thanks Nory!! Looping takes a "long" time if the row it big. Is there another way to get te results?
What code did you end up with?
How much data do you have and how are you filtering it?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks