circaa
07-07-2006, 01:14 PM
Hi
On my worksheet, the column A contains dates. I want to create a research between 2 dates. I know the autofilter already contains an option(Personalised) that can do the job but you have to select two dates already in the listbox and they're not sorted so it's painfull.
1) I want the user to enter the 2 dates on a form, and when the button search is clicked, I want to sort all my rows(by column A) with the autofilter "increasing"
2)Once this is done, I could loop through all my rows and hide the ones that are before the first date, keep the ones between and then hide the ones after the second date.
So I wanna know if there's a better way to do that...and if not...I need help to autofilter the first row by vba.
Thanks
Joey
On my worksheet, the column A contains dates. I want to create a research between 2 dates. I know the autofilter already contains an option(Personalised) that can do the job but you have to select two dates already in the listbox and they're not sorted so it's painfull.
1) I want the user to enter the 2 dates on a form, and when the button search is clicked, I want to sort all my rows(by column A) with the autofilter "increasing"
2)Once this is done, I could loop through all my rows and hide the ones that are before the first date, keep the ones between and then hide the ones after the second date.
So I wanna know if there's a better way to do that...and if not...I need help to autofilter the first row by vba.
Thanks
Joey