Old Value Cell Reference

Occasional Contributor

I have a workbook I have built that I am so close to finishing. The issue I am having is the workbook has a login user form, the admin sheet logs who is logged on, and when I have a cell that shows who the current user is. In another sheet there is a dynamic table, there are item codes that the employees enter and it will reference the item and time stamp the item to show when it was changed. I need to reference the cell that shows the current user BUT not change the cell of each row when a new user is logged in. Please help, I have researched this for several hours with no luck with my particular application. Images attached


7 Replies
so tagged this with macros and VBA and I'm thinking you are using VBA to do the timestamp. What I don't know is why you can't use VBA to copy the value of the user name also. Maybe you could attach the actual files instead pictures (remove any confidential/personal info).


Please see attached. As far as time stamps go, no I was just using a formula in the cell duplicated using the table. the ID to get in is 1234


There are some things that I have been working on adding and have run into snags as well but those are to come.


Thanks for the assistance!

I'm having many problems with your workbook not opening/closing and many non-existent name references. I don't know if maybe you deleted confidential info and that is the problem? It is very hard to tell what is wrong in the mix.
That said it is obvious that you have a login form so get rid of the circular references and have the macro set those cells with the login name and timestamp. Then other cells that need to point to the person that entered the data have the macro either set those values or point to the corresponding point in the login in log.


I am new to VBA and know only what I can find online. I fixed the time stamp in all areas except the admin pages as I can not get that to work. But the circular references are turned off and the error is gone. Perhaps you can help me now. the pas word is 1234

I appreciate it. 

@jdavis1994  i made a few tweaks. 

I changed the worksheet functions from SelectionChange to Change so that it will create the timestamp and user name only when the value is entered/changed

I commented some items out that caused issue

I added the user name entries

I changed the action when you 'x' out of the login window to give option to close the workbook

Hope it is working how you hoped.

FWIW I really hope you don't consider this password protected in any way or even any claim that users can't see each other's information.  There are ways of making it 'better' but in general I would never consider an excel file to be secure.



This s was vey helpful! The security is more or less just to track who is in and out of the sheet. As I know they can get into VBA and disable the log in. The people I am using this for are not this savvy in VBA. So no real issues there.  This was a problem when I sent it to you why does it show the user twice in the log?

@jdavis1994  honestly I'm not too fond of this code but I'm not one to judge.  That said I re-did some of it (again).  I would probably re-do more if I knew exactly what you needed and that I wouldn't be un-doing some functionality you intended.  Tell me what you need and what exactly this is not doing right.