ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Input Box for today's date (https://www.excelbanter.com/excel-discussion-misc-queries/211589-input-box-todays-date.html)

Brent E

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,

Brent E

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,


Mike H

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,


Abe[_2_]

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,


Brent E

Input Box for today's date
 
Thanks Guys. Both of those will be great solutions. Thanks for the assistance.


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com