View Full Version : Allow cell entry only by shortcut key
SRuth
03-15-2012, 07:32 AM
I have a time log tracker set up and need to have start and stop times entered to calculate production times, but I don't want the employees to be able to enter times manually. I want to limit the entry to the CTRL SHIFT ; shortcut to eliminate fraud.
I am a beginner at macros and VBA and appreciate any help.
I have attached a copy of the spreadsheet and unlocked Sheet "Mon"
wrightyrx7
03-15-2012, 01:01 PM
Be WARNED. I am new to VBA so if this is not what you want im sorry. But i seen your thread why I was in work, and when i got home you had no reply.
I couldn't use Ctrl+Shift+;
But i used:-
Ctrl+Shift+L (to lock the range)
Ctrl+Shift+U (to unlock the range)
I have attached the file. test it out.
Let me know what you think.
Chris
wrightyrx7
03-15-2012, 01:03 PM
Never mind i read your post wrong! lol
wrightyrx7
03-15-2012, 01:28 PM
How about this. I couldnt do Ctrl+Shift+;
But i used "Ctrl+Shift+T"
Im guessing the cell the times go into are now protected. So click on the cell you want to put the time in press "Ctrl+Shift+T"
Then try change the time after it is input.
Is this what you wanted?
Regards
Chris
SRuth
03-15-2012, 01:59 PM
Chris
Thanks for the replys, but that is not what I am looking for, we already use the shortcut keys for entering the time and I do have the colomns locked in the sheet I use. I want to restrict the time entrys to only use the shortcut key and not allow manual entry.
Thanks
Sean
wrightyrx7
03-15-2012, 02:03 PM
Is that not what i did with my last reply? You should lock the cells that the time goes into. Then when they want to input the times they cannot unless they press "Ctrl+Shift+T"
Which columns do the times go into?
Would you be able to input some example data in your workbook on the Mon sheet?
Thanks
Chris
SRuth
03-15-2012, 02:17 PM
Chris
I have attached a copy of the Workbook. The password is "prod4" for the workbook and each sheet.
If you lock the range you can not enter the time manually or with a shortcut key.
Thanks for your time and help.
Sean
wrightyrx7
03-15-2012, 02:22 PM
You can if you highlight the start time cell and press "Ctrl+Shift+T" this shortcut runs the macro i made to unlock the cell, time stamp the cell, then lock the cell in one go so that it cannot be tampered with.
Am i miss understanding you?
Regards
Chris
SRuth
03-15-2012, 02:40 PM
Chris
I really am not normally this slow, but I don't see it.
It is not working on the sheet I uploaded and I don't see a macro anywhere.
Sean
mikerickson
03-15-2012, 02:45 PM
If you lock the cells and Protect the worksheet with UserInterfaceOnly set to True, then the user won't be able to alter the cells' contents without using a macro.
wrightyrx7
03-15-2012, 02:51 PM
Try this workbook. I have protected the STOP column. But In the Stop Column press CTRL+Shift+T
Hope this is what you want... like i said im really new to VBA but trying to help people is helping me learn :)
Thanks
Chris
SRuth
03-16-2012, 08:30 AM
Chris
Thanks for all your help. Does exactly what I was looking for.
Sean
wrightyrx7
03-16-2012, 11:53 AM
No problem :) glad it worked.
Regards
Chris
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.