ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   putting in todays date (https://www.excelbanter.com/excel-programming/308626-putting-todays-date.html)

Dan[_41_]

putting in todays date
 
hello,

I am looking for coding that will allow me to put in
todays date into a cell when a checkbox is checked. Any
help would be appreciated.

Thanks,
Dan

mangesh_yadav[_64_]

putting in todays date
 
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Range("A1").Value = Now()
Else
Range("A1").Value = ""
End If
End Sub

- Manges

--
Message posted from http://www.ExcelForum.com


Dan[_41_]

putting in todays date
 
What would i change "now()" to if i do not want the time?


-----Original Message-----
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Range("A1").Value = Now()
Else
Range("A1").Value = ""
End If
End Sub

- Mangesh


---
Message posted from http://www.ExcelForum.com/

.


Tom Ogilvy

putting in todays date
 
Date

Range("A1").Value = Date
--
Regards,
Tom Ogilvy


"Dan" wrote in message
...
What would i change "now()" to if i do not want the time?


-----Original Message-----
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Range("A1").Value = Now()
Else
Range("A1").Value = ""
End If
End Sub

- Mangesh


---
Message posted from http://www.ExcelForum.com/

.





All times are GMT +1. The time now is 12:54 AM.

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