+ Reply to Thread
Results 1 to 2 of 2

Excel Tracking Read Only Clicks

  1. #1
    Registered User
    Join Date
    01-17-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    2

    Smile Excel Tracking Read Only Clicks

    Hi All,

    Hope your all ok.
    I have searched everywhere and cannot find an answer so hopefully you can help. Im quite new to VBA so im struggling a bit .

    I have a spreadsheet that I need to update to to present weekly information, other users then have read only access so they can check for any updates. I need to log which users are looking at the sheet, to see if it is actually being used.

    I have tried VBA such as
    Private Sub Workbook_Open()
    With Sheets("Log")
    lastrow = .Cells(Rows.Count, "A").End(xlUp).Row + 1
    .Cells(lastrow, 1) = Environ("Username")
    .Cells(lastrow, 1).Offset(, 1).Value = Now
    End With
    ActiveWorkbook.Save
    End Sub

    Which does the job, but i cannot set the sheet as Read Only as it just saves another copy of the sheet.
    Im looking for a way of recording who is going into the sheet (Read Only), so i was thinking, is there a way of tracking which user has clicked on the Read Only option and when they clicked (date time etc), the sheet is on a shared network and i dont have any authority access.

    I hope that makes sense.

    Thanks
    Slice

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,433

    Re: Excel Tracking Read Only Clicks

    You're best bet would be to pick up the User ID, date and time as you are doing now but build them into a string and write them out to a text file in the same folder.

    You'd open the text file to Append, Print the details to it rather than Write to it, and close it immediately in case others need the workbook at the same time. It doesn't really matter how long the workbook is open.

    Look for examples of reading from and writing to text files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

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