Lets just say we have this as Command1

```
Dim Command1 = "whoami.exe >> C:\Hello.Txt"

```

The program will read a list of users from a text file and then perform the action on each of them. If the user does not exist, or they are part of a password protected computer, I would like to see that in my printout.

I have this but am Unsure how to write the If Then Statement (If that is the ebst route to take)

```
For Each strUserName as String in strLines
Shell("cmd.exe /c" & Command1)
If Command1 = fail??
Then msgbox("Oops") ???

```