Todays date as default

pilot

Active Member
Joined
Feb 17, 2002
Messages
345
Today's date should appear automatically in an unprotected cell of a protected sheet. The user may then move on, accepting it by default, or replace it with another date. All unprotected cells will be wiped clean for the next use of the form so I don't think =TODAY() is the way to go. I know an auto open macro could plug today's date in the appropriate cell and the wipe clean macro could do the same. Is there a better way?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Here's a little ditty I use before print to put in the date and a footer with the path.
the date will not change unless you want it to.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim sht As Worksheet
Dim intResponse As Integer
'Prompts the user for a date if printing the PROPOSAL
If ActiveSheet.Name = ("PROPOSAL") Then
Range("F28").Select
intResponse = MsgBox(prompt:="INSERT TODAY'S DATE?", _
Buttons:=vbQuestion + vbYesNoCancel, Title:="REMINDER")
Select Case intResponse
Case vbYes
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.NumberFormat = "mmmm d, yyyy"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Case vbNo
Exit Sub
Case vbCancel
Cancel = True
End Select
End If
'Inserts the path in the footer of every sheet
For Each sht In ThisWorkbook.Sheets
sht.PageSetup.LeftFooter = "&8" & _
ThisWorkbook.FullName
Next sht
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top