
You can get
“Computer Name“!

Use “Environ function“!
VBA Code
You can get “Computer Name” by “Environ function“.
Sub sampleProc()
'Get "Computer Name"
MsgBox Environ("COMPUTERNAME")
End Sub
Result
You got “Computer Name“!

FYI No.1
Also, you can get “User Name“.
For more information, see the following article:
FYI No.2
Also, you can get “path to the Desktop“.
For more information, see the following article:
FYI No.3
For more information about following, see the following official online manual:
●Environ function