framcc06
02-06-2019, 01:46 PM
Hi,
I am currently using a userform for filtering a table in a sheet based on whats entered in some text boxes
Selection.AutoFilter Field:=1, Criteria1:=UserForm1.tbFirstName.Value & "*" 'Filter by First Name
Selection.AutoFilter Field:=2, Criteria1:=UserForm1.tbLastName.Value & "*" 'Filter by Last Name
Selection.AutoFilter Field:=3, Criteria1:=UserForm1.tbDOB.Value & "*" 'Filter by Date of Birth
The First Name & Last Name filters work ok but the Date of Birth does not (assuming because the cells are formatted as dates).
Is there anything I need to add/change in order for it to work.
Thanks
Fra
I am currently using a userform for filtering a table in a sheet based on whats entered in some text boxes
Selection.AutoFilter Field:=1, Criteria1:=UserForm1.tbFirstName.Value & "*" 'Filter by First Name
Selection.AutoFilter Field:=2, Criteria1:=UserForm1.tbLastName.Value & "*" 'Filter by Last Name
Selection.AutoFilter Field:=3, Criteria1:=UserForm1.tbDOB.Value & "*" 'Filter by Date of Birth
The First Name & Last Name filters work ok but the Date of Birth does not (assuming because the cells are formatted as dates).
Is there anything I need to add/change in order for it to work.
Thanks
Fra