View Single Post
  #22   Report Post  
Posted to microsoft.public.excel.misc
LCTECH001 LCTECH001 is offline
external usenet poster
 
Posts: 12
Default If cell is blank automatically enter today's date in the same cell

On Jan 19, 8:21*am, GS wrote:
LCTECH001 formulated the question :





On Jan 19, 12:04*am, GS wrote:
You probable get an error message of 'ambiguous' or 'duplicate'
something or other. You can't have 2 procedures with thesamename 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 athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Hi Garry,


Brilliant! I'm so grateful for all your assistance. These forums are
just amazing and so good to know there is help out there when you feel
you've exhausted your knowledge and you don't know where else to turn!
Have a great day and I imagine we'll cross paths again with my never
ending excel conundrums!


Regards


LC


You're welcome! Glad to be of help...

Did you see my latest offering below? It gives you some abreviated
methods for doing multiple sheets!

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -

- Show quoted text -


Hi Garry, Wow! This VB code stuff is quite addictive!! I was quite
pleased when I manged to write a successful formula but now you've
opened up a whole new world of problem solving!!! Thank you for the
additional information. I'm going to try it on a test sheet so I can
learn more about what VB can do and hopefully become better at it!

Very helpful!

Regards

L