Results 1 to 3 of 3

Display 'Last Modified' date in worksheet cells

Threaded View

  1. #1
    Registered User
    Join Date
    05-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Display 'Last Modified' date in worksheet cells

    Hi

    I've have a workbook containing 5 worksheets and I have allocated a cell in each sheet to automatically display the date that sheet was last modified. This is to allow for each sheet to present a modified date specific to the worksheet rather than the workbook as a whole.

    The code that I have implemented is displaying the "Last Modified: dd mmmm yyyy" string as I require but it is also causing Excel to crash whenever I modify/delete contents from any other cells. I'm not a coder so can anyone assist with debugging the details below please?

    Version
    Excel 2010 (Excel Macro-Enabled Workbook)

    VB Code (against every worksheet)
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    Dim LValue As String
    LValue = Format(Now(), "dd mmmm yyyy")
    Range("K3") = "Last Modified: " & LValue
    End Sub

    Error
    Microsoft Visual Basic
    Run-time error ‘-2147417848 (800 10 108)’:
    Method ‘_Default’ of object ‘Range’ failed

    Followed by ..... Microsoft Excel has stopped working ….. Restart the program


    Any help will be appreciated. Thanks.
    Last edited by Badger72; 05-26-2011 at 03:29 AM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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