P
Can anybody check this code for me
Private Sub CmdView_Click()
Dim extension As String
Dim returnValue
extension = UCase$(Right$(txtFile.Text, 3))
If Dir$(txtFile.Text) = " " Then
MsgBox "File is not found!", vbExclamation
ElseIf extension = "TXT" Then
returnValue = Shell("Notepad" & txtFile.Text, 1)
ElseIf extension = "BMP" Then
returnValue = Shell("Pbrush" & txtFile.Text, 1)
End If
End Sub
It didn't work !!!!
Private Sub CmdView_Click()
Dim extension As String
Dim returnValue
extension = UCase$(Right$(txtFile.Text, 3))
If Dir$(txtFile.Text) = " " Then
MsgBox "File is not found!", vbExclamation
ElseIf extension = "TXT" Then
returnValue = Shell("Notepad" & txtFile.Text, 1)
ElseIf extension = "BMP" Then
returnValue = Shell("Pbrush" & txtFile.Text, 1)
End If
End Sub
It didn't work !!!!