ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to insert Current Time into protected cell (https://www.excelbanter.com/excel-programming/334369-macro-insert-current-time-into-protected-cell.html)

[email protected]

Macro to insert Current Time into protected cell
 

I'm trying to create a time sheet and I want to have a macro insert the
current time into a protected cell (to stop people editing the time
manually)
Is this possible?? Any tips/hints


Ron de Bruin

Macro to insert Current Time into protected cell
 
One way is to unprotect the sheet in the code (password = ron)

ActiveSheet.Unprotect "ron"
Range("C10").Value = Format(Time, "hh mm ss")
ActiveSheet.Protect "ron"



--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...

I'm trying to create a time sheet and I want to have a macro insert the
current time into a protected cell (to stop people editing the time
manually)
Is this possible?? Any tips/hints





All times are GMT +1. The time now is 05:35 PM.

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