Tags: auto, automaticly, cell, collect, date, enter, excel, microsoft, msdn, pick, press, software, system, time

pick date & time from my system auto

On Microsoft » Microsoft Excel

2,138 words with 3 Comments; publish: Thu, 22 May 2008 23:26:00 GMT; (30662.50, « »)

i want to do that as i enter any name in a cell and press enter its automaticly collect the date and time from system to next cell how can i do this plz help me !! thankx

All Comments

Leave a comment...

  • 3 Comments
    • You could do it with worksheet event code

      Private Sub Worksheet_Change(ByVal Target As Range)

      Application.EnableEvents = False

      On Error GoTo ws_exit

      Target.Offset(0, 1).Value = Now

      ws_exit:

      Application.EnableEvents = True

      End Sub

      Put this in the worksheet code module.

      --

      HTH

      Bob Phillips

      ... looking out across Poole Harbour to the Purbecks

      (remove nothere from the email address if mailing direct)

      "help me" <discover_ghalib.excel.todaysummary.com.hotmail.com> wrote in message

      news:87AA03D5-D2E4-478D-A95C-30C0C64DB78C.excel.todaysummary.com.microsoft.com...

      > i want to do that as i enter any name in a cell and press enter its

      automaticly collect the date and time from system to next cell how can i

      do this plz help me !! thankx

      #1; Thu, 22 May 2008 23:28:00 GMT
    • >--Original Message--

      >i want to do that as i enter any name in a cell and

      press enter its automaticly collect the date and time from

      system to next cell how can i do this plz help me !!

      thankx

      >.

      >

      Copy this into a VB module

      Sub Auto_Open()

      Application.OnEntry = "GetDate"

      End Sub

      Sub GetDate()

      Sheets("sheet1").Select

      If ActiveCell.Column = 1 And _

      ActiveCell.Row > 3 _

      And Not IsEmpty(ActiveCell) Then

      ActiveCell.Offset(0, 1) = Now()

      End If

      End Sub

      It places the date into column B provided that the row is

      greater than 3. Change the sheet, row and column to suit.

      You might like to change the format.

      Regards

      Peter

      #2; Thu, 22 May 2008 23:29:00 GMT
    • Right click the sheet tab and select View Code. Copy and paste th

      following macro. You may need to change the column number (etc).

      '---

      Private Sub Worksheet_Change(ByVal Target As Excel.Range)

      If ActiveCell.Column = 1 Then

      ActiveCell.Offset(0, 1).Value = Format(Now, "dd/mm/yy")

      End If

      End Sub

      '----

      --

      Message posted from http://www.ExcelForum.com

      #3; Thu, 22 May 2008 23:29:00 GMT