Collecting Text from a Varible and using it in an If statement

Im working with the following in VB

I have a

Dim switchport1 As String = [Insert call to a function to retrieve a value from a device on the network]

The code is getting the value from the device as a string fine (fyi the string is the number 1) but what i wanna do is this

If switchport Is “1” Then

switchportPanel.BckColor = Color.Green

End If

switchportPanel of course being a Simple Empty Panel on the form however I think im doing my if statement wrong can someone point me in the write direction how to properly pull the string from “switchport” in my If statement?

submitted by /u/IWatchUSleepAtNight
[link] [comments]

Leave a Reply