ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to create date when sheet opens and then remain static when (https://www.excelbanter.com/excel-worksheet-functions/247573-macro-create-date-when-sheet-opens-then-remain-static-when.html)

paankadu

Macro to create date when sheet opens and then remain static when
 
I have a workbook with 2 sheets.

Day Log
Night Log

Each sheet will have several locked cells to keep users from making changes.
The date cell will be locked. I need for the workbook to enter the current
date on both sheets when the workbook is initially opened. The user will
then make their entries and the file will be saved with a new name thru
documentum. Would then need this file to maintain that date and not change
to the current date again if the workbook ever needs to be re-opened.

I had submitted a similar earlier post a couple of weeks ago and I believe
Jacob had assisted me with it, but now I can't find that post. It worked
great for 1 sheet but I couldn't get it to work on multiple sheets.

I appreciate any help you can give me. I tried looking thru some of the
various help links thru out the posts but didn't quite find what I was
looking for.
--
Thanks,
Angie

Don Guillett

Macro to create date when sheet opens and then remain static when
 
You did not post the code but you could put into the ThisWorkbook module
using a worksheet_open event to unlockput DATE into a desired celllock.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"paankadu" wrote in message
...
I have a workbook with 2 sheets.

Day Log
Night Log

Each sheet will have several locked cells to keep users from making
changes.
The date cell will be locked. I need for the workbook to enter the
current
date on both sheets when the workbook is initially opened. The user will
then make their entries and the file will be saved with a new name thru
documentum. Would then need this file to maintain that date and not
change
to the current date again if the workbook ever needs to be re-opened.

I had submitted a similar earlier post a couple of weeks ago and I believe
Jacob had assisted me with it, but now I can't find that post. It worked
great for 1 sheet but I couldn't get it to work on multiple sheets.

I appreciate any help you can give me. I tried looking thru some of the
various help links thru out the posts but didn't quite find what I was
looking for.
--
Thanks,
Angie



Jacob Skaria

Macro to create date when sheet opens and then remain static when
 
Hi Again

Try the below modified version of the previous maro....Replace your existing
code withn workbook Open event

Private Sub Workbook_Open()
Dim Sh As Worksheet
For Each Sh In Sheets
With Sh
..Unprotect Password:="password"
..Range("A1") = Date
..Protect Password:="password"
End With
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"paankadu" wrote:

I have a workbook with 2 sheets.

Day Log
Night Log

Each sheet will have several locked cells to keep users from making changes.
The date cell will be locked. I need for the workbook to enter the current
date on both sheets when the workbook is initially opened. The user will
then make their entries and the file will be saved with a new name thru
documentum. Would then need this file to maintain that date and not change
to the current date again if the workbook ever needs to be re-opened.

I had submitted a similar earlier post a couple of weeks ago and I believe
Jacob had assisted me with it, but now I can't find that post. It worked
great for 1 sheet but I couldn't get it to work on multiple sheets.

I appreciate any help you can give me. I tried looking thru some of the
various help links thru out the posts but didn't quite find what I was
looking for.
--
Thanks,
Angie



All times are GMT +1. The time now is 07:34 PM.

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