![]() |
People keep doing things they shouldn't on my sheet
Hi I am using some code to track what a person does in my sheet. There are
some people in the group that will not stop pressing a button on the sheet to carry out a procedure which takes a long time for the pc to calculate and perform. Its been mentioned to everyone numerous times but someone keeps on doing it. I dont know who because the tracking code does not log button presses on forms or movement between sheets. Maybe its possible that the file is working itself but I havent written the code! I dont know if its possible but does anyone know of a way to add button presses and sheet selection with usernames to the following codes output. This is the code: 'UNBLANK THE FOLLOWING TO SAVE INFORMATION CHANGED IN TRACKER FILE ' 'Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) 'If Target.Locked Then 'TrackFile = "O:\Wastewater East\York Catchment\Naburn Sludge\extras.dll" 'TargUser = UserName() 'TargAddr = Sh.Name & "!" & Target.Address(False, False) 'TargVal = Target.Resize(1, 1).Text 'TargDate = Format(Now, "yyyy/mm/dd hh:mm") 'x = TargDate & vbTab & TargUser & vbTab & TargAddr & vbTab & TargVal 'Open TrackFile For Append As #1 'Print #1, x 'Close #1 'End If 'End Sub If you want to know the output or the code in the Username module let me know and I will post it. Thanks for your help. Rob |
People keep doing things they shouldn't on my sheet
|
People keep doing things they shouldn't on my sheet
Just some quick thought:
If your Excel file being used by others and want the code can only be used by yourself, try: In your code, check whether a specific file exists if yes, then click the button will run your procedure. (the file will be stored only in your computer) if no, then click the button will do nothing. (if others click the button, the procedure will not run because of no file) So, you need create that file in your computer only. "Robert Hargreaves" wrote in message ... Hi I am using some code to track what a person does in my sheet. There are some people in the group that will not stop pressing a button on the sheet to carry out a procedure which takes a long time for the pc to calculate and perform. Its been mentioned to everyone numerous times but someone keeps on doing it. I dont know who because the tracking code does not log button presses on forms or movement between sheets. Maybe its possible that the file is working itself but I havent written the code! I dont know if its possible but does anyone know of a way to add button presses and sheet selection with usernames to the following codes output. This is the code: 'UNBLANK THE FOLLOWING TO SAVE INFORMATION CHANGED IN TRACKER FILE ' 'Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) 'If Target.Locked Then 'TrackFile = "O:\Wastewater East\York Catchment\Naburn Sludge\extras.dll" 'TargUser = UserName() 'TargAddr = Sh.Name & "!" & Target.Address(False, False) 'TargVal = Target.Resize(1, 1).Text 'TargDate = Format(Now, "yyyy/mm/dd hh:mm") 'x = TargDate & vbTab & TargUser & vbTab & TargAddr & vbTab & TargVal 'Open TrackFile For Append As #1 'Print #1, x 'Close #1 'End If 'End Sub If you want to know the output or the code in the Username module let me know and I will post it. Thanks for your help. Rob |
All times are GMT +1. The time now is 06:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com