![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Houston, TX
Posts: 303
|
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?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Las Vegas Nevada USA
Posts: 240
|
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
__________________
George Learn to listen. Opportunity sometimes knocks very softly. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|