Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Input Box for today's date

Good day,

I am looking for the VBA code that, when run, will place the current date in
B2 using this format:
DD MonthName YYYY

For example: Todays date would read
25 November 2008.

If this format is difficult to achieve, using a standard DD/MM/YYYY format
could work.

Your assistance is appreciated. Thanks.

Cordially,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Input Box for today's date

I'd like to include with this the possibility of using an Input Box to
request the user to enter the date, and then place the date in B2 with the
format mentioned. Any suggestions?

Thanks.

"Brent E" wrote:

Good day,

I am looking for the VBA code that, when run, will place the current date in
B2 using this format:
DD MonthName YYYY

For example: Todays date would read
25 November 2008.

If this format is difficult to achieve, using a standard DD/MM/YYYY format
could work.

Your assistance is appreciated. Thanks.

Cordially,

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Input Box for today's date

Hi,

Maybe this

Sub GetDate()
response = InputBox("Please enter date", "Date Entry", Format(Date, "dd mmmm
yyyy"))
With Sheets("Sheet1").Range("B2")
.Value = response
.NumberFormat = "dd mmmm yyyy"
End With
End Sub

Mike

"Brent E" wrote:

I'd like to include with this the possibility of using an Input Box to
request the user to enter the date, and then place the date in B2 with the
format mentioned. Any suggestions?

Thanks.

"Brent E" wrote:

Good day,

I am looking for the VBA code that, when run, will place the current date in
B2 using this format:
DD MonthName YYYY

For example: Todays date would read
25 November 2008.

If this format is difficult to achieve, using a standard DD/MM/YYYY format
could work.

Your assistance is appreciated. Thanks.

Cordially,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Input Box for today's date

Thanks Guys. Both of those will be great solutions. Thanks for the assistance.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Input Box for today's date

One way is to input this formula in B2: =TODAY()
Then format B2 as follows: right-click on it, select Format Cells, in Number
tab select Custom, in Type box input "dd mmmm yyyy" (without quotes) and
press Enter. Thereafter B2 would always have today's date in that format. No
need for VBA.

"Brent E" wrote:

Good day,

I am looking for the VBA code that, when run, will place the current date in
B2 using this format:
DD MonthName YYYY

For example: Todays date would read
25 November 2008.

If this format is difficult to achieve, using a standard DD/MM/YYYY format
could work.

Your assistance is appreciated. Thanks.

Cordially,



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
conditional formatting for cell date to equal today's date Sistereinstein Excel Worksheet Functions 2 September 10th 12 07:53 PM
How input today's date and keep that date tjsmags Excel Worksheet Functions 3 December 30th 07 10:17 PM
I need today's date returned as date format in formula CMIConnie Excel Discussion (Misc queries) 2 February 23rd 06 04:38 PM
Count number of cells with date <today's date Cachod1 New Users to Excel 2 January 28th 06 02:37 AM
count the number of cells with a date <= today's date Cachod1 New Users to Excel 3 January 27th 06 09:14 PM


All times are GMT +1. The time now is 10:24 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"