+ Reply to Thread
Results 1 to 3 of 3

Date Format Issue

  1. #1
    Registered User
    Join Date
    04-20-2005
    Posts
    52

    Date Format Issue

    HI All

    I have the following code that enters the date when a cell is filled.

    IT works perfectly thx to this forums help - thx all.

    Private Sub Worksheet_Change(ByVal Target As Range)

    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range("D11:D100")) Is Nothing Then
    With Target
    .Offset(0, -1).Value = Format(Time, "hh:mm:ss")
    .Offset(0, -2).Value = Format(Date, "dd/mm/yyyy")
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub


    My problem is since it changed to June yesterday the date is displaying in US date format.

    I have the cells formated as d/mm/yyyy on the worksheet but is still is displaying todays date as 06/3/2005 how can I force it to display British / Australian format
    3/06/2005.

    look forward to your reply

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516
    Hi,
    try
    Please Login or Register  to view this content.

  3. #3
    James W.
    Guest

    RE: Date Format Issue

    change .Offset(0, -2).Value = Format(Date, "dd/mm/yyyy")
    to

    "Mikeice" wrote:

    >
    > HI All
    >
    > I have the following code that enters the date when a cell is filled.
    >
    > IT works perfectly thx to this forums help - thx all.
    >
    > Private Sub Worksheet_Change(ByVal Target As Range)
    >
    > On Error GoTo ws_exit:
    > Application.EnableEvents = False
    > If Not Intersect(Target, Me.Range("D11:D100")) Is Nothing Then
    > With Target
    > .Offset(0, -1).Value = Format(Time, "hh:mm:ss")
    > .Offset(0, -2).Value = Format(Date, "dd/mm/yyyy")
    > End With
    > End If
    >
    > ws_exit:
    > Application.EnableEvents = True
    > End Sub
    >
    >
    > My problem is since it changed to June yesterday the date is displaying
    > in US date format.
    >
    > I have the cells formated as d/mm/yyyy on the worksheet but is still is
    > displaying todays date as 06/3/2005 how can I force it to display
    > British / Australian format
    > 3/06/2005.
    >
    > look forward to your reply
    >
    >
    > --
    > Mikeice
    > ------------------------------------------------------------------------
    > Mikeice's Profile: http://www.excelforum.com/member.php...o&userid=22467
    > View this thread: http://www.excelforum.com/showthread...hreadid=376154
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1