Can somebody help resolve the error that is caused by the code shown below? I get a "cannot start process because a file name has not been provided" error.
The following warnings were received: "Warning 1 Variable 'test' is used before it has been assigned a value. A null reference exception could result at runtime."
"Warning 2 Variable 'fileName' is used before it has been assigned a value. A null reference exception could result at runtime."
The screenshots show the errors and warnings.
Private Sub OpenFile(ByVal AFileName As String)
'EE Version 1 without error code
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = AFileName
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked = True Then
Dim fileName As String
Dim test As String
Select Case test
fileName = "C:\test_3\johnson.pdf"
fileName = "C:\test_3\Ross.pdf"