Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
Hi @Simon Scott ,
Also note that ‘ElseIf’ and ‘Then’ should be written on one line.
If Environment.MachineName = "file001" Then
lblHostname.Text = "Fileserver 1"
ElseIf Environment.MachineName = "file002" Then
lblHostname.Text = "Fileserver 2"
ElseIf Environment.MachineName = "file003" Then
lblHostname.Text = "Fileserver 3"
ElseIf Environment.MachineName = "file004" Then
lblHostname.Text = "Fileserver 4"
End If
Best Regards,
Xingyu Zhao
*
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.