Sometimes you might require to find user's computer name various scenarios like to track which computer has accessed the file or database, etc.
We can find the computer's name using below VBA code.
Function FindComputerName() as String
FindComputerName = environ(6)
Note: Copy paste above function to your module, You can use it as an Excel function or call from a sub procedure.