Paste year as a specific date

  • Thread starter Thread starter Patrick C. Simonds
  • Start date Start date
P

Patrick C. Simonds

Can anyone think of a way in which someone could enter a number
(representing a year, say 2009) and then paste the results into cell A1 as
January 1 of that year?
 
What this should say is:

Can anyone think of a way in which someone could enter a number in a
TextBox (representing a year, say 2009) and then paste the results into cell
A1 as
January 1 of that year?
 
Something like this maybe...

Range("A1").Value = DateSerial(TextBox1.Value, 1, 1)

Rick
 
Yes, thank you

Rick Rothstein (MVP - VB) said:
Something like this maybe...

Range("A1").Value = DateSerial(TextBox1.Value, 1, 1)

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top