tzcoding
New Member
- Joined
- Mar 17, 2023
- Messages
- 8
- Office Version
- 2016
- Platform
- Windows
I have both sides of the code but do not know how to join them together. One part of the cod will pull the Windows user name but not work with a selected range and not work with if there is a change in that range. The other part works with with timestamping when ever there is a change within a selected ranch and logs that day.
Timestamp Code:
Windows Username:
Does anyone know how to join the two into one?
Timestamp Code:
VBA Code:
Public Function ModDate(Reference As Range)
Dim cell As Range
For Each cell In Reference
ModDate = Format(Now, "dd-mm-yyyy hh:mm AM/PM")
Next cell
End Function
Windows Username:
Code:
Public Function UserName()
UserName = Environ$("UserName")
End Function
Does anyone know how to join the two into one?