If cell is blank automatically enter today's date in the same cell
On Jan 12, 12:29*pm, GS wrote:
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 athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Hi Garry,
Thank you for assisting with this! I have etered this new code into
the VBE Code sheet but nothing is happening! When I copy and paste the
code in I have pressed the save icon but I'm not sure if I have to
save the code as a macro? Do I name it to run it in the actual
worksheet as I have deleted the formula I had in M10 and now the cell
is blank and todays date is not appearing! Can you advise what I'm
doing wrong?
Best Regards
LC
|