View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
The Fool on the Hill The Fool on the Hill is offline
external usenet poster
 
Posts: 58
Default How to use now() in a special way

Hello Roger,

Thanks for your input, I appreciate it.

Jay

"Roger Govier" wrote:

Hi

That should work fine.
Maybe Application.EnableEvents has been switched off.

In the Immediate windows of the VBE (press Control + G to bring it up if
not visible), enter the following
Application.EnableEvents=True
and press Enter.

Then try again

--
Regards

Roger Govier


"The Fool on the Hill"
wrote in message
...
Hello Mike,

Thanks for your answer and patience with my ignorance.

When i enter something in the B:B range (for instance B4), then the
date
must be entered in the H:H range (in this case H4).

I have tried to change your advice and this is what I have come up
with:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
If Target.Count 1 Then Exit Sub
Set rng = Range("B:B") '< Could be B:B for an entire column
If Intersect(Target, rng) Is Nothing Then Exit Sub
If Target < "" Then Target.Offset(0, 6) = Now()
If Target = "" Then Target.Offset(0, 6) = ""
End Sub

It seems as if it does not work.

Thanks for your help !!