![]() |
Identify User, Copy/Paste Login Info. to External File
Im wondering if there is a way to create a private sub to identify someone
who has opened a spreadsheet, by the windows login ID, and also get the time and date that the spreadsheet was opened. Id like to copy/paste this information to a Word document (or a text file), which could be located on the C-drive. Ideally, Id like to create a running log of all instances of users opening the spreadsheet, so the 2nd, 3rd, 4th, etc. users would have to be appended to the Word document so that the original time stamps were not overwritten. I have a time stamping macro, but everything is done right in Excel, not outside of Excel. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("$A$1:$b$400")) Is Nothing Then Application.EnableEvents = False Application.ScreenUpdating = False With Worksheets("Sheet2") .Select .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select ActiveCell.Value = Target.Address ActiveCell.Offset(0, 1).Select ActiveCell.Value = Target.Value ActiveCell.Offset(0, 1).Select ActiveCell.Value = Now() ActiveCell.NumberFormat = "mm/dd/yy" ActiveCell.Offset(0, 1).Select ActiveCell.Value = InputBox("You've made a change to the Rates tab. Please enter your name here for historical purposes.") Application.EnableEvents = True Application.ScreenUpdating = True End With End If End Sub How can I send this data to an external destination and append new instances of users opening the file? Regards, Ryan-- -- RyGuy |
Identify User, Copy/Paste Login Info. to External File
Ryan,
Here are a few links that may help out... http://www.dailydoseofexcel.com/arch...sheet-changes/ http://www.excelforum.com/showthread.php?t=632556 http://www.ozgrid.com/VBA/track-changes.htm Mark "ryguy7272" wrote in message ... Im wondering if there is a way to create a private sub to identify someone who has opened a spreadsheet, by the windows login ID, and also get the time and date that the spreadsheet was opened. Id like to copy/paste this information to a Word document (or a text file), which could be located on the C-drive. Ideally, Id like to create a running log of all instances of users opening the spreadsheet, so the 2nd, 3rd, 4th, etc. users would have to be appended to the Word document so that the original time stamps were not overwritten. I have a time stamping macro, but everything is done right in Excel, not outside of Excel. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("$A$1:$b$400")) Is Nothing Then Application.EnableEvents = False Application.ScreenUpdating = False With Worksheets("Sheet2") .Select .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select ActiveCell.Value = Target.Address ActiveCell.Offset(0, 1).Select ActiveCell.Value = Target.Value ActiveCell.Offset(0, 1).Select ActiveCell.Value = Now() ActiveCell.NumberFormat = "mm/dd/yy" ActiveCell.Offset(0, 1).Select ActiveCell.Value = InputBox("You've made a change to the Rates tab. Please enter your name here for historical purposes.") Application.EnableEvents = True Application.ScreenUpdating = True End With End If End Sub How can I send this data to an external destination and append new instances of users opening the file? Regards, Ryan-- -- RyGuy |
Identify User, Copy/Paste Login Info. to External File
These are some good resources Mark; I use one now. However, I am wondering
if I can copy/paste chnages to a Word document (or a text file), which could be located on the C-drive. Ideally, Id like to create a running log of all instances of users opening the spreadsheet, so the 2nd, 3rd, 4th, etc. users would have to be appended to the Word document so that the original time stamps were not overwritten. Thanks! Ryan--- -- RyGuy "Mark Ivey" wrote: Ryan, Here are a few links that may help out... http://www.dailydoseofexcel.com/arch...sheet-changes/ http://www.excelforum.com/showthread.php?t=632556 http://www.ozgrid.com/VBA/track-changes.htm Mark "ryguy7272" wrote in message ... Im wondering if there is a way to create a private sub to identify someone who has opened a spreadsheet, by the windows login ID, and also get the time and date that the spreadsheet was opened. Id like to copy/paste this information to a Word document (or a text file), which could be located on the C-drive. Ideally, Id like to create a running log of all instances of users opening the spreadsheet, so the 2nd, 3rd, 4th, etc. users would have to be appended to the Word document so that the original time stamps were not overwritten. I have a time stamping macro, but everything is done right in Excel, not outside of Excel. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("$A$1:$b$400")) Is Nothing Then Application.EnableEvents = False Application.ScreenUpdating = False With Worksheets("Sheet2") .Select .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select ActiveCell.Value = Target.Address ActiveCell.Offset(0, 1).Select ActiveCell.Value = Target.Value ActiveCell.Offset(0, 1).Select ActiveCell.Value = Now() ActiveCell.NumberFormat = "mm/dd/yy" ActiveCell.Offset(0, 1).Select ActiveCell.Value = InputBox("You've made a change to the Rates tab. Please enter your name here for historical purposes.") Application.EnableEvents = True Application.ScreenUpdating = True End With End If End Sub How can I send this data to an external destination and append new instances of users opening the file? Regards, Ryan-- -- RyGuy |
All times are GMT +1. The time now is 10:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com