Hello Excel gurus,
Can there be a combination of code that will:
1. Get Environ("username") in memory
2. Paste said username into an edited row cell at, say, A5 when any in B5:X5 is edited, down to each potential row 1000+
3. Check current Environ username against all rows with Pasted username for match
4. If match, unlock rows that match. If no match, lock rows that don't . (keep blank rows unlocked as well)
5. Result = a Reversi situation upon sheet select(or open file) where only current user can edit his own lines or add new lines.
Challenges for me:
I have been looking through dozens of posts. (2 examples below). I'm still beginning in VBA, so this has been quite the experience trying to bridge the gap.
https://www.mrexcel.com/forum/excel-questions/238435-unprotect-cell-based-username-match.html
Excel VBA - Insert Username ONLY when cell is changed - Stack Overflow
Can there be a combination of code that will:
1. Get Environ("username") in memory
2. Paste said username into an edited row cell at, say, A5 when any in B5:X5 is edited, down to each potential row 1000+
3. Check current Environ username against all rows with Pasted username for match
4. If match, unlock rows that match. If no match, lock rows that don't . (keep blank rows unlocked as well)
5. Result = a Reversi situation upon sheet select(or open file) where only current user can edit his own lines or add new lines.
Challenges for me:
- Havent seen the type of operation (3-5) in forums though I see some of the pieces for it.
- most implementations for locking a row require cell editing to trigger, would need an event like upon Workbook_open or activation of sheet to properly enforce (3-5) consistently.
I have been looking through dozens of posts. (2 examples below). I'm still beginning in VBA, so this has been quite the experience trying to bridge the gap.
https://www.mrexcel.com/forum/excel-questions/238435-unprotect-cell-based-username-match.html
Excel VBA - Insert Username ONLY when cell is changed - Stack Overflow