"Freeze" functions on an overtime form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

We have a read-only overtime form with the today() function etc. to open to
the current day and setu-up the form with the calendar entries for the
current days of the week.
Problem: If a person has saved a completed form for future reference when
the completed form is opened say ... a week later this calendar based data
updates to the current date!

Is is possible render the functions inactive when an employee saves the file
for future reference. ie. when the completed form is saved we don't want the
calendar based information to change.

Help and thank-you
 
You can put code in the Workbook_BeforeSave Event Procedure as below
(DateCell would be the cell containing the Today() formula):

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Range(DateCell).Copy
Range(DateCell).PasteSpecial xlPastevalues

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top