View Single Post
  #9   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

Scrap all the previous code posted, and delete it ALL from your
workbook!

In the VBE, double-click ThisWorkbook and paste the following into the
code window:

Option Explicit

Private Sub Workbook_Open()
With Sheets("<sheetname").Range("M10")
If .Value = "" Then .Value = Date
End With
End Sub

**Be sure to substitute <sheetname with the actual sheet name!

--
Garry

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