View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.misc
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default If cell is blank automatically enter today's date in the same cell

You probable get an error message of 'ambiguous' or 'duplicate'
something or other. You can't have 2 procedures with the same name in a
single project.

Also, there is no 'ThisWorksheet'! It's 'ThisWorkbook', and the code
should be like this...

Option Explicit

Private Sub Workbook_Open()
With Sheets("Package Summary Report").Range("M10")
If .Value = "" Then .Value = Date
End With

With Sheets("Package Activity Report").Range("M10")
If .Value = "" Then .Value = Date
End With
End Sub

Double-click (in the VBE) each worksheet listed with 'ThisWorkbook' and
delete all code not being used for other purposes.

HTH

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc