Applying Filter but still reading all records

JONeill

Board Regular
Joined
Sep 2, 2018
Messages
58
So, I'm creating a search form that allows the user to search based on the fields in a data worksheet. There is a cover sheet to hide all the background stuff from the user. In the main form the data is read into a collection. Everytime I make a change like sorting, adding, updating etc., I erase the data and write the collection back to the worksheet. This is because, I'm using a rowsource for a listbox to get columns and even though I don't display the background steps, I still get a quick blink every time I make a change. This creates a few complexities when making changes to records when a filter is applied. To see what happens I've manually applied a filter and use the same code to read the records in. To my surprise, It reads all the records even though the filter is displaying about 2/3 of them. Even the listbox displays all of them. So, I tried applying the filter in the code and I get the same thing. Apparently, I'm not understanding something here. Maybe I'm just better off using Access.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi JONeill,

Have you tried Advanced Filter - Copy to another location? If running code, make sure ScreenUpdating is off.

Hope that helps,

Doug
 
Upvote 0
You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Upvote 0
I'll need a member email address to share it in DropBox. Hopefully, you won't laugh at my code! :)
 
Upvote 0
Ok, when you have the link, you only publish it here.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top