Using Environ we can get username while open the workbook in VBA and also learn workbook open events with current time and date
Пікірлер: 10
@souravdey2236 Жыл бұрын
If I open the Excel and enter sat my username will appear . But if some other opens the excel after that will his/her name appear in place of my name . If yes , then please suggest to overcome this problem
@vbaautomationtutorialpoint5315 Жыл бұрын
In this scenario get last blank row using code once it found then store the user name
@gauravims0252 жыл бұрын
we need to use $ after Environ always and also we need to define in Dim, the username as string or there is no need?
@vbaautomationtutorialpoint53152 жыл бұрын
You can also use only Environ("username") if you want and do not need to declare or define username as string. It will work
@gauravims0252 жыл бұрын
@@vbaautomationtutorialpoint5315 i have tried ..its working for my username but if some other user is running ..its not working..do you know wht could be the reason??
@vbaautomationtutorialpoint53152 жыл бұрын
@@gauravims025 it's return username who,s using system, and for other user its also work if it using another desktop or same desktop by switching user
@vbaautomationtutorialpoint53152 жыл бұрын
If it useful then ok otherwise please call me for further information
@trilochanjena38367 ай бұрын
how to show username in userform
@vbaautomationtutorialpoint53157 ай бұрын
Simple Textbox.value= environ("username")
@trilochanjena38367 ай бұрын
@@vbaautomationtutorialpoint5315 thanks.. but i built a login userform for multiple users.. so in the main userform i want to show the username on it..plz guide