PDA

View Full Version : Date selection help please



Pocketjem
03-28-2016, 07:47 AM
I'm very new to VBA. I have searched for an answer to my VBA/Excel problem but cannot really find anything that helps me with my particular problem.
I need to be able to enter a date range in two textboxes (‘txtDateFrom’ and ‘txtDateTo’) on a VBA form (I’ve already created the VBA form in Excel). I then need to select individual rows from Sheet1 (see data from Sheet1 below) based on column B and the date criteria from my two textboxes.
I intend using the ‘click’ event of a button on my VBA form (cmdExtractData) to run the code. I would then like to put this extracted data into Sheet2 of my spreadsheet so I can do further analysis on it. Sheet2 will therefore look exactly like Sheet1, but with only those rows of data that match the date criteria selected in the two textboxes.
May I take this opportunity to thank you for your help in advance.
Jem
Spreadsheet Data:
1,19/07/2015,1,F,P,White Goods,One Off,£250.00
2,24/08/2015,2,D,A,Handyman Services,Ongoing,£500.00
3,21/07/2015,3,W,L,Home Assistance,One Off,£750.00
4,01/09/2015,4,F,C,Convalescent/Respite,One Off,£250.00
5,17/06/2015,5,D,H,Living Expenses,Ongoing,£500.00
6,29/11/2015,1,F,O,Specialist Equipment,One Off,£250.00
7,12/12/2015,4,D,O,Convalescent/Respite,One Off,£250.00
8,23/01/2016,2,D,L,Transport Costs,One Off,£500.00
9,27/02/2016,4,W,L,Living Expenses,One Off,£500.00
10,03/11/2015,4,F,C,Convalescent/Respite,One Off,£750.00