How to get name of the computer in VBA? May 20, 2023 by Tarik Dim sHostName As String ' Get Host Name / Get Computer Name sHostName = Environ$("computername")