ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Insert date then lock cell! (https://www.excelbanter.com/excel-discussion-misc-queries/61144-insert-date-then-lock-cell.html)

mevetts

Insert date then lock cell!
 

Hi,

Is it possible to have the formula =TODAY(), but when entered into a
cell is then locked, so it doesn't alter the following day.

I want a button that when clicked, enteres this formula into the
selected cell, but once entered I want the cell to then lock so the
date does then not ever alter.

Can this be done?

Thanks,

Mark.


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=494762


Dave Peterson

Insert date then lock cell!
 
Don't use a formula. Just plop the date in directly--something like this in
your buttonclick code:


with activecell
.value = date
.numberformat = "mm/dd/yyyy"
end with



mevetts wrote:

Hi,

Is it possible to have the formula =TODAY(), but when entered into a
cell is then locked, so it doesn't alter the following day.

I want a button that when clicked, enteres this formula into the
selected cell, but once entered I want the cell to then lock so the
date does then not ever alter.

Can this be done?

Thanks,

Mark.

--
mevetts

------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=494762


--

Dave Peterson

mevetts

Insert date then lock cell!
 

Will give it a go, thanks.


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=494762


pinmaster

Insert date then lock cell!
 

Hi, another quick way to insert todays date in the selected cell is to
simply hit the CTRL + ; keys.

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=494762


mevetts

Insert date then lock cell!
 

Cheers Dave, got it working and it's just the job.

Mark.


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=494762



All times are GMT +1. The time now is 04:53 PM.

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