Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Paste year as a specific date

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Paste year as a specific date

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?

"Patrick C. Simonds" wrote in message
...
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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Paste year as a specific date

Something like this maybe...

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

Rick


"Patrick C. Simonds" wrote in message
...
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?

"Patrick C. Simonds" wrote in message
...
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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Paste year as a specific date

Yes, thank you

"Rick Rothstein (MVP - VB)" wrote in
message ...
Something like this maybe...

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

Rick


"Patrick C. Simonds" wrote in message
...
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?

"Patrick C. Simonds" wrote in message
...
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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine year over year date for comparison zeroscou Excel Worksheet Functions 3 March 6th 09 10:01 PM
Converting a year date into a specific day date jonny Charts and Charting in Excel 1 July 4th 07 09:06 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Year-to-date year to date formula Philm Excel Worksheet Functions 1 October 7th 05 02:50 AM
Macro to Paste to specific line, and continue to Paste each time on next row not over tomkarakowski[_2_] Excel Programming 1 May 28th 04 06:50 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"