Hello everyone,
I'm new to this forum and i'm looking at expanding my skillset and I figure since I use excel for many parts of my projects I'd take up learning VBA for excel. Also, I was recently involved in an incident (not the first time) where my manager developed a specification document (done in excel) a while back in which he was no expert or even should be spec-ing anyways. A long story short, he tried to blame me for some errors he made by saying that I did the spec even though I know I didn't. Luckily I always keep records of all documents I produce locally on my machine so if something is on the network and not on my machine, chances are I didn't do it. When I confronted him about it he confidently and half-arrogantly said he had proof that I sent it to him via email. I called him on that bluff, asked him to send me the email for my records because I didn't have the spec, and right away he did a 180 and admitted that maybe he did the spec and "couldn't remember". This has not been the only incident and has happened to some other coworkers as well especially when there's some blatant errors he's made, so I'd like to put something in our templates that will start getting people to be responsible for their work.
This lead me to attempt to add some functionality to our excel documents. I'm trying to add some revision visibility to certain cells within the documents. What i'm looking to do is that anytime a sheet in a workbook is modified a corresponding cell in the modified sheet will update with the name of the user who modified it (we're on a corporate network so it'll be a user ID like tranh2). Each sheet will have a "Last Modified by:" field and a "Last Modified Date:" field. There will be multiple sheets in each workbook most randomly named sheets. I done some reading and I know I can use the Environ("Username") function to pull the username. Where I am getting stuck is writing the values to only the sheets that are modified and leaving the ones that are not modified alone. I've done some reading with respect to the Worksheet Change event and I tried to implement it but got some range errors. So not sure...i'm new to vba so...tried first before asking.
So for example, if there are 5 sheets and only sheets 1 and 3 are modified, I'd like to have it so when the user clicks save, only the corresponding cells in sheets 1 and 3 are updated with the user who modified it and the date. Is this possible? And what is the best way to do this?
Sorry for long email...threw some horrible boss B***tching in there for some who want entertainment reading.
Bookmarks