Excel VBA how to search data from a date

S5ON3E

New Member
Joined
May 11, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm trying to do a research in a userform from a date, I can search from a word but can't figure out how to do it from a date. Like here in the picture, from the textbox I have to enter the date of birth then click search and then the looked for data would go in respective textbox. Can someone help me? Thank you

F5201D67-56EE-49E8-84F8-EAFD0248F0B5.png
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
So your going to enter Month in Month Textbox and Day in Day TextBox and Year in Year Text box

And search for the Date where?
Excel has millions and millions of cells
We need to know in what column or row this data might be found and then return the results to the other Textboxes. And where might we find this other data?

We always need specific details.
Give sheet name to search and what column might we find this data
Say column A or B do not say column Birthday or something like that.

And we need to known the names of all these TextBoxes.
 
Upvote 0
The data is in a sheet name database and the column is D.
The textbox6 is for the year, textbox7 for the month and textbox8 for the day.
The data collected from the database would be send into textbox9, textbox10 and textbox11.

Thank you
 
Upvote 0
Show me exactly how the date will be seen in column D

Will it be 5/7/2022 or 5-21-2022

Some people enter dates like Month Day Year or Day Month year

And where is script going to find Drivers License Address and Class D permit?
 
Upvote 0
This is not specific:
You said:
The data collected from the database would be send into textbox9, textbox10 and textbox11.

Which is which?
What goes into 9 10 and 11
 
Upvote 0
9 is the driver permit, 10 the address and 11 the class permit

Thank you
 
Upvote 0
This may be more difficult for me then I first though.
To search for dates like this may be difficult.
Maybe someone else here on the form can provide an answer.
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
 
Upvote 0
I think it would be a lot easier for a user to select a Date from a Combobox

So we load all the dates for this year into a combobox and user selects the date he wants to search for.
 
Upvote 0

Forum statistics

Threads
1,223,631
Messages
6,173,464
Members
452,516
Latest member
archcalx

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