Aussie5380
New Member
- Joined
- Sep 30, 2022
- Messages
- 32
- Office Version
- 2019
- Platform
- Windows
Hi There,
I have been provided with the below macro, but im having a little trouble with the user name not updating when the workbook is opened by another staff member.
The code i have is below:
Public Function UserName()
Application.Volatile
UserName = Environ$("UserName")
End Function
I have tried to add the "Application.Volatile" bit, but it doesnt update the range of cells i need.
The cells where the user name is to generate is:
D11:F11 (merged cells)
The code in the cells is:
=VBAProject.WELCOME.UserName()
When someone else opens it, it has my name listed, where it should have the current users name (as its linked to checklist generators and saves the staff having to write their name)
Is anyone able to assist, im just not sure what else i can try?
Many thanks,
Shaun
I have been provided with the below macro, but im having a little trouble with the user name not updating when the workbook is opened by another staff member.
The code i have is below:
Public Function UserName()
Application.Volatile
UserName = Environ$("UserName")
End Function
I have tried to add the "Application.Volatile" bit, but it doesnt update the range of cells i need.
The cells where the user name is to generate is:
D11:F11 (merged cells)
The code in the cells is:
=VBAProject.WELCOME.UserName()
When someone else opens it, it has my name listed, where it should have the current users name (as its linked to checklist generators and saves the staff having to write their name)
Is anyone able to assist, im just not sure what else i can try?
Many thanks,
Shaun